Merge pull request #4568 from xyflow/fix-draggable

Fix grab cursor
This commit is contained in:
Moritz Klack
2024-08-19 15:21:52 +02:00
committed by GitHub
4 changed files with 14 additions and 5 deletions
+3 -1
View File
@@ -253,9 +253,11 @@ export function Pane({
selectionStarted.current = false;
};
const draggable = panOnDrag === true || (Array.isArray(panOnDrag) && panOnDrag.includes(0));
return (
<div
className={cc(['react-flow__pane', { draggable: panOnDrag, dragging, selection: isSelecting }])}
className={cc(['react-flow__pane', { draggable, dragging, selection: isSelecting }])}
onClick={hasActiveSelection ? undefined : wrapHandler(onClick, container)}
onContextMenu={wrapHandler(onContextMenu, container)}
onWheel={wrapHandler(onWheel, container)}