mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(editor): Remove selection box when only one node selected using selection rectangle (#14160)
This commit is contained in:
@@ -139,6 +139,7 @@ const {
|
|||||||
onNodesInitialized,
|
onNodesInitialized,
|
||||||
findNode,
|
findNode,
|
||||||
viewport,
|
viewport,
|
||||||
|
nodesSelectionActive,
|
||||||
onEdgeMouseLeave,
|
onEdgeMouseLeave,
|
||||||
onEdgeMouseEnter,
|
onEdgeMouseEnter,
|
||||||
onEdgeMouseMove,
|
onEdgeMouseMove,
|
||||||
@@ -357,6 +358,12 @@ function onSelectionDragStop(event: NodeDragEvent) {
|
|||||||
onUpdateNodesPosition(event.nodes.map(({ id, position }) => ({ id, position })));
|
onUpdateNodesPosition(event.nodes.map(({ id, position }) => ({ id, position })));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSelectionEnd() {
|
||||||
|
if (selectedNodes.value.length === 1) {
|
||||||
|
nodesSelectionActive.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onSetNodeActivated(id: string) {
|
function onSetNodeActivated(id: string) {
|
||||||
props.eventBus.emit('nodes:action', { ids: [id], action: 'update:node:activated' });
|
props.eventBus.emit('nodes:action', { ids: [id], action: 'update:node:activated' });
|
||||||
emit('update:node:activated', id);
|
emit('update:node:activated', id);
|
||||||
@@ -796,6 +803,7 @@ provide(CanvasKey, {
|
|||||||
@node-drag-stop="onNodeDragStop"
|
@node-drag-stop="onNodeDragStop"
|
||||||
@node-click="onNodeClick"
|
@node-click="onNodeClick"
|
||||||
@selection-drag-stop="onSelectionDragStop"
|
@selection-drag-stop="onSelectionDragStop"
|
||||||
|
@selection-end="onSelectionEnd"
|
||||||
@selection-context-menu="onOpenSelectionContextMenu"
|
@selection-context-menu="onOpenSelectionContextMenu"
|
||||||
@dragover="onDragOver"
|
@dragover="onDragOver"
|
||||||
@drop="onDrop"
|
@drop="onDrop"
|
||||||
|
|||||||
Reference in New Issue
Block a user