Skip to content

Commit

Permalink
fix(editor): Fix selection rectangle context menu on new canvas (#12584)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgrozav authored Jan 13, 2025
1 parent 2110e9a commit c8e3c53
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/editor-ui/src/components/canvas/Canvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"
>
Expand Down

0 comments on commit c8e3c53

Please sign in to comment.