disable drag when there's a magnified node

This commit is contained in:
Evan Simkowitz 2024-08-15 15:03:15 -07:00
parent c187059c8f
commit 42cc9f5d18
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -49,8 +49,8 @@
--zindex-layout-last-magnified-node: 1;
--zindex-layout-resize-handle: 2;
--zindex-layout-placeholder-container: 3;
--zindex-layout-magnified-node: 4;
--zindex-layout-overlay-container: 5;
--zindex-layout-overlay-container: 4;
--zindex-layout-magnified-node: 5;
--zindex-block-mask-inner: 10;
// z-indexes in xterm.css

View File

@ -183,11 +183,12 @@ const DisplayNode = ({ layoutModel, layoutNode, contents }: DisplayNodeProps) =>
() => ({
type: dragItemType,
item: () => layoutNode,
canDrag: () => !layoutModel?.treeState?.magnifiedNodeId,
collect: (monitor) => ({
isDragging: monitor.isDragging(),
}),
}),
[layoutNode]
[layoutNode, layoutGeneration]
);
const [previewElementGeneration, setPreviewElementGeneration] = useState(0);