Skip to content

Commit

Permalink
fix(icons): Add Clipboard icon and update MetadataProvider for null c…
Browse files Browse the repository at this point in the history
…hecks (#4615)
  • Loading branch information
sedghi authored Dec 18, 2024
1 parent 0fc89c3 commit 93d7076
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion platform/core/src/classes/MetadataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class MetadataProvider {
break;
case WADO_IMAGE_LOADER_TAGS.VOI_LUT_MODULE:
const { WindowCenter, WindowWidth, VOILUTFunction } = instance;
if (WindowCenter === undefined || WindowWidth === undefined) {
if (WindowCenter == null || WindowWidth == null) {
return;
}
const windowCenter = Array.isArray(WindowCenter) ? WindowCenter : [WindowCenter];
Expand Down
3 changes: 3 additions & 0 deletions platform/ui-next/src/components/Icons/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import InvestigationalUse from './Sources/InvestigationalUse';
import IconTransferring from './Sources/IconTransferring';
import Alert from './Sources/Alert';
import AlertOutline from './Sources/AlertOutline';
import Clipboard from './Sources/Clipboard';
import {
Tool3DRotate,
ToolAngle,
Expand Down Expand Up @@ -360,6 +361,7 @@ export const Icons = {
/>
),
// Icons
Clipboard,
ActionNewDialog,
GroupLayers,
Database,
Expand Down Expand Up @@ -666,6 +668,7 @@ export const Icons = {
'layout-common-2x3': (props: IconProps) => LayoutCommon2x3(props),
pencil: (props: IconProps) => Pencil(props),
'icon-list-view': (props: IconProps) => ListView(props),
clipboard: (props: IconProps) => Clipboard(props),

/** Adds an icon to the set of icons */
addIcon: (name: string, icon) => {
Expand Down
15 changes: 15 additions & 0 deletions platform/ui-next/src/components/Icons/Sources/Clipboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import type { IconProps } from '../types';

export const Clipboard = (props: IconProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
viewBox="0 0 24 24"
{...props}
>
<path d="M6 22v-16h16v7.543c0 4.107-6 2.457-6 2.457s1.518 6-2.638 6h-7.362zm18-7.614v-10.386h-20v20h10.189c3.163 0 9.811-7.223 9.811-9.614zm-10 1.614h-5v-1h5v1zm5-4h-10v1h10v-1zm0-3h-10v1h10v-1zm2-7h-19v19h-2v-21h21v2z" />
</svg>
);

export default Clipboard;

0 comments on commit 93d7076

Please sign in to comment.