fix(editor): Fix selection rectangle context menu on new canvas (#12584)

This commit is contained in:
Alex Grozav 2025-01-13 17:13:11 +02:00 committed by GitHub
parent 2110e9a051
commit c8e3c5399e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"
>