make sure elements are deselected once the selection starts
This commit is contained in:
@@ -177,6 +177,7 @@ export function Pane({
|
|||||||
triggerNodeChanges,
|
triggerNodeChanges,
|
||||||
triggerEdgeChanges,
|
triggerEdgeChanges,
|
||||||
defaultEdgeOptions,
|
defaultEdgeOptions,
|
||||||
|
resetSelectedElements,
|
||||||
} = store.getState();
|
} = store.getState();
|
||||||
|
|
||||||
if (!containerBounds.current || !userSelectionRect) {
|
if (!containerBounds.current || !userSelectionRect) {
|
||||||
@@ -196,6 +197,7 @@ export function Pane({
|
|||||||
if (distance <= paneClickDistance) {
|
if (distance <= paneClickDistance) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
resetSelectedElements();
|
||||||
onSelectionStart?.(event);
|
onSelectionStart?.(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,7 @@
|
|||||||
if (distance <= paneClickDistance) {
|
if (distance <= paneClickDistance) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
store.unselectNodesAndEdges();
|
||||||
onselectionstart?.(event);
|
onselectionstart?.(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user