fix: Delete study measurements instead of all measurements (#4882)

This commit is contained in:
Bill Wallace authored and GitHub committed 2025-03-25 09:32:29 -04:00
1 parent 165c9dc710
commit 8e47112d8e
16 files changed
+237 -232

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^3.7.5",
"@cornerstonejs/dicom-image-loader": "^3.7.8",
"@emotion/serialize": "^1.1.3",
"@ohif/core": "3.10.0-beta.134",
"@ohif/extension-cornerstone": "3.10.0-beta.134",
+1 -1
View File
@@ -37,7 +37,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^3.7.5",
"@cornerstonejs/dicom-image-loader": "^3.7.8",
"@ohif/ui": "3.10.0-beta.134",
"cornerstone-math": "0.1.9",
"dicom-parser": "^1.8.21"
@@ -63,14 +63,16 @@ const DialogOverlay = React.forwardRef<
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
interface DialogContentProps
extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {}
extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
unstyled?: boolean;
}
const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
DialogContentProps & {
children?: React.ReactNode;
}
>(({ className, children, ...props }, ref) => {
>(({ className, children, unstyled, ...props }, ref) => {
const { isDraggable, shouldCloseOnEsc, shouldCloseOnOverlayClick, showOverlay } =
React.useContext(DialogContext);
@@ -84,7 +86,8 @@ const DialogContent = React.forwardRef<
// When not isDraggable, Tailwind centers the dialog.
// When isDraggable, we remove the built‑in centering so our inline transform takes over.
const contentClassName = cn(
'max-w-md w-full bg-muted data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid gap-4 p-4 shadow-lg duration-200 sm:rounded-lg',
unstyled ? '' : 'w-full',
'max-w-md bg-muted data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid gap-4 p-4 shadow-lg duration-200 sm:rounded-lg',
!isDraggable ? 'translate-x-[-50%] translate-y-[-50%]' : '',
className
);
@@ -110,10 +113,12 @@ const DialogContent = React.forwardRef<
}}
>
{children}
<DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none">
<Cross2Icon className="text-primary h-4 w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
{!unstyled && (
<DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none">
<Cross2Icon className="text-primary h-4 w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
)}
</DialogPrimitive.Content>
);
@@ -46,7 +46,7 @@ export const PanelSection: React.FC<PanelSectionProps> & {
);
};
PanelSection.Header = ({ children, className, showChevron = true }) => (
PanelSection.Header = ({ children, className }) => (
<AccordionTrigger
className={cn(
'bg-secondary-dark hover:bg-accent text-aqua-pale',
@@ -50,6 +50,7 @@ const ManagedDialog: React.FC<ManagedDialogProps> = ({
>
<DialogContent
className={cn(unstyled ? 'p-0' : '', containerClassName)}
unstyled={unstyled}
style={{
...(defaultPosition
? {