refactor(svelte): add zoomActivationKey and allow null for keys #3618 (#3627)

* refactor(keys): add zoomActivationKey and allow null #3618
This commit is contained in:
Moritz Klack
2023-11-15 19:06:49 +01:00
committed by GitHub
parent aeb1c4132f
commit 14caf422c3
8 changed files with 103 additions and 55 deletions
@@ -34,6 +34,8 @@
export let selectionKey: $$Props['selectionKey'] = undefined;
export let selectionMode: $$Props['selectionMode'] = undefined;
export let panActivationKey: $$Props['panActivationKey'] = undefined;
export let multiSelectionKey: $$Props['multiSelectionKey'] = undefined;
export let zoomActivationKey: $$Props['zoomActivationKey'] = undefined;
export let nodesDraggable: $$Props['nodesDraggable'] = undefined;
export let nodesConnectable: $$Props['nodesConnectable'] = undefined;
export let nodeDragThreshold: $$Props['nodeDragThreshold'] = undefined;
@@ -166,7 +168,13 @@
{...$$restProps}
role="application"
>
<KeyHandler {selectionKey} {deleteKey} {panActivationKey} />
<KeyHandler
{selectionKey}
{deleteKey}
{panActivationKey}
{multiSelectionKey}
{zoomActivationKey}
/>
<Zoom
{initialViewport}
{onMoveStart}