feat(utils): add vanilla drag and panzoom (#3108)

* refactor(panzoom): create vanilla helper

* feat(svelte): add interaction example

* refactor(panzoom): cleanup

* Update function-runner.ts

* refactor(panzoom): cleanup

* refactor(panzoom): rename functions

* feat(utils): add vanilla drag helper (#3107)

* feat(utils): add vanilla drag helper

* refactor(drag): cleanup

* refactor(drag): cleanup

* chore(packages): cleanup

* refactor(panzoom): cleanup and simplify
This commit is contained in:
Moritz Klack
2023-05-31 15:55:36 +02:00
committed by GitHub
parent d8ef041737
commit 1dab08f36e
59 changed files with 3258 additions and 4313 deletions
@@ -48,7 +48,7 @@
selectionRectMode,
selectionKeyPressed,
selectionMode,
resetSelectedElements,
unselectNodesAndEdges,
} = useStore();
let container: HTMLDivElement;
@@ -61,7 +61,7 @@
function onClick(event: MouseEvent) {
dispatch('pane:click', event);
resetSelectedElements();
unselectNodesAndEdges();
selectionRectMode.set(null);
}
@@ -80,7 +80,7 @@
const { x, y } = getEventPosition(event, containerBounds);
resetSelectedElements();
unselectNodesAndEdges();
selectionRect.set({
width: 0,