feature(segmentation): Add contour tools and utilities in a side panel (#5517)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
This commit is contained in:
73 files changed
+2770
-435
No files matched your search
@@ -87,7 +87,10 @@ interface DataRowProps {
|
||||
description: string;
|
||||
details?: { primary: string[]; secondary: string[] };
|
||||
//
|
||||
/** Primary selection: selected and in the active segmentation */
|
||||
isSelected?: boolean;
|
||||
/** Secondary selection: selected but in an inactive segmentation */
|
||||
isSecondarySelected?: boolean;
|
||||
onSelect?: (e) => void;
|
||||
//
|
||||
isVisible: boolean;
|
||||
@@ -103,6 +106,7 @@ interface DataRowProps {
|
||||
//
|
||||
colorHex?: string;
|
||||
onColor: (e) => void;
|
||||
onCopy?: (e) => void;
|
||||
className?: string;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
@@ -121,7 +125,9 @@ const DataRowComponent = React.forwardRef<HTMLDivElement, DataRowProps>(
|
||||
onRename,
|
||||
onDelete,
|
||||
onColor,
|
||||
onCopy,
|
||||
isSelected = false,
|
||||
isSecondarySelected = false,
|
||||
isVisible = true,
|
||||
disableEditing = false,
|
||||
className,
|
||||
@@ -146,6 +152,9 @@ const DataRowComponent = React.forwardRef<HTMLDivElement, DataRowProps>(
|
||||
case 'Rename':
|
||||
onRename(e);
|
||||
break;
|
||||
case 'Copy':
|
||||
onCopy?.(e);
|
||||
break;
|
||||
case 'Lock':
|
||||
onToggleLocked(e);
|
||||
break;
|
||||
@@ -234,7 +243,11 @@ const DataRowComponent = React.forwardRef<HTMLDivElement, DataRowProps>(
|
||||
onClick={onSelect}
|
||||
data-cy="data-row"
|
||||
>
|
||||
{/* Hover Overlay */}
|
||||
{/* Secondary Selection Tint (below hover, always visible when secondary-selected) */}
|
||||
{isSecondarySelected && (
|
||||
<div className="bg-primary/20 pointer-events-none absolute inset-0"></div>
|
||||
)}
|
||||
|
||||
<div className="bg-primary/20 pointer-events-none absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100"></div>
|
||||
|
||||
{/* Number Box */}
|
||||
@@ -351,6 +364,17 @@ const DataRowComponent = React.forwardRef<HTMLDivElement, DataRowProps>(
|
||||
Rename
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
{onCopy && (
|
||||
<DropdownMenuItem onClick={e => handleAction('Copy', e)}>
|
||||
<Icons.Copy className="text-foreground" />
|
||||
<span
|
||||
className="pl-2"
|
||||
data-cy="Duplicate"
|
||||
>
|
||||
Duplicate
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
<DropdownMenuItem onClick={e => handleAction('Delete', e)}>
|
||||
<Icons.Delete className="text-foreground" />
|
||||
<span
|
||||
|
||||
Reference in new issue
Block a user