allow paneClick events to happen more leniantly

This commit is contained in:
peterkogo
2025-10-27 15:35:03 +01:00
parent f8c547d92f
commit fa7bf16ce3
4 changed files with 79 additions and 59 deletions

View File

@@ -9,11 +9,6 @@
import '@xyflow/svelte/dist/style.css';
const onPaneContextMenu = (e: any) => {
e.preventDefault();
console.log('context menu');
};
const panOnDrag = [1, 2];
const onmovestart = (e: any) => console.log('move start', e);
@@ -46,10 +41,12 @@
selectionMode={SelectionMode.Partial}
selectionOnDrag
panOnScroll
paneClickDistance={100}
{panOnDrag}
{onmovestart}
{onmove}
{onmoveend}
onpaneclick={(e) => console.log('on pane click', e)}
>
<Controls />
<Background variant={BackgroundVariant.Dots} />