Skip to content

Commit 24521d1

Browse files
committed
added tsdoc
1 parent fd686fc commit 24521d1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-canvas-context-menu.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ interface UseCanvasContextMenuProps {
1111
setNodes: (updater: (nodes: Node[]) => Node[]) => void
1212
}
1313

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+
*/
1422
export function useCanvasContextMenu({ blocks, getNodes, setNodes }: UseCanvasContextMenuProps) {
1523
const [activeMenu, setActiveMenu] = useState<MenuType>(null)
1624
const [position, setPosition] = useState({ x: 0, y: 0 })

0 commit comments

Comments
 (0)