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,
|
||||
findNode,
|
||||
viewport,
|
||||
nodesSelectionActive,
|
||||
onEdgeMouseLeave,
|
||||
onEdgeMouseEnter,
|
||||
onEdgeMouseMove,
|
||||
@@ -357,6 +358,12 @@ function onSelectionDragStop(event: NodeDragEvent) {
|
||||
onUpdateNodesPosition(event.nodes.map(({ id, position }) => ({ id, position })));
|
||||
}
|
||||
|
||||
function onSelectionEnd() {
|
||||
if (selectedNodes.value.length === 1) {
|
||||
nodesSelectionActive.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function onSetNodeActivated(id: string) {
|
||||
props.eventBus.emit('nodes:action', { ids: [id], action: 'update:node:activated' });
|
||||
emit('update:node:activated', id);
|
||||
@@ -796,6 +803,7 @@ provide(CanvasKey, {
|
||||
@node-drag-stop="onNodeDragStop"
|
||||
@node-click="onNodeClick"
|
||||
@selection-drag-stop="onSelectionDragStop"
|
||||
@selection-end="onSelectionEnd"
|
||||
@selection-context-menu="onOpenSelectionContextMenu"
|
||||
@dragover="onDragOver"
|
||||
@drop="onDrop"
|
||||
|
||||
Reference in New Issue
Block a user