only prevent pointer events when starting selection box on top of node

This commit is contained in:
peterkogo
2025-10-28 12:20:47 +01:00
parent 5d0887c9db
commit f29adb8353
3 changed files with 16 additions and 17 deletions

View File

@@ -30,7 +30,7 @@ const BasicFlow = () => {
<ReactFlow
defaultNodes={initialNodes}
defaultEdges={initialEdges}
selectionOnDrag
selectionOnDrag={true}
selectionMode={SelectionMode.Partial}
panOnDrag={panOnDrag}
panOnScroll
@@ -47,6 +47,9 @@ const BasicFlow = () => {
onPaneClick={(e) => console.log('pane click', e)}
onSelectionStart={(e) => console.log('on selection start', e)}
onSelectionEnd={(e) => console.log('on selection end', e)}
onPointerDown={(e) => console.log('pointer down', e)}
onPointerUp={(e) => console.log('pointer up', e)}
onClick={(e) => console.log('click', e)}
>
<Background variant={BackgroundVariant.Cross} />
<Controls />