We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd686fc commit 24521d1Copy full SHA for 24521d1
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-canvas-context-menu.ts
@@ -11,6 +11,14 @@ interface UseCanvasContextMenuProps {
11
setNodes: (updater: (nodes: Node[]) => Node[]) => void
12
}
13
14
+/**
15
+ * Hook for managing workflow canvas context menus.
16
+ *
17
+ * Handles right-click events on nodes, pane, and selections with proper multi-select behavior.
18
19
+ * @param props - Hook configuration
20
+ * @returns Context menu state and handlers
21
+ */
22
export function useCanvasContextMenu({ blocks, getNodes, setNodes }: UseCanvasContextMenuProps) {
23
const [activeMenu, setActiveMenu] = useState<MenuType>(null)
24
const [position, setPosition] = useState({ x: 0, y: 0 })
0 commit comments