From c8e3c5399efde93486c1dd5c373cb2c5ff8a0691 Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Mon, 13 Jan 2025 17:13:11 +0200 Subject: [PATCH] fix(editor): Fix selection rectangle context menu on new canvas (#12584) --- packages/editor-ui/src/components/canvas/Canvas.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/editor-ui/src/components/canvas/Canvas.vue b/packages/editor-ui/src/components/canvas/Canvas.vue index 1501f587451ff..f9697b864513b 100644 --- a/packages/editor-ui/src/components/canvas/Canvas.vue +++ b/packages/editor-ui/src/components/canvas/Canvas.vue @@ -519,6 +519,13 @@ function onOpenContextMenu(event: MouseEvent) { }); } +function onOpenSelectionContextMenu({ event }: { event: MouseEvent }) { + contextMenu.open(event, { + source: 'canvas', + nodeIds: selectedNodeIds.value, + }); +} + function onOpenNodeContextMenu( id: string, event: MouseEvent, @@ -692,6 +699,7 @@ provide(CanvasKey, { @node-drag-stop="onNodeDragStop" @node-click="onNodeClick" @selection-drag-stop="onSelectionDragStop" + @selection-context-menu="onOpenSelectionContextMenu" @dragover="onDragOver" @drop="onDrop" >