feat(svelte): add drag n drop example

This commit is contained in:
moklick
2023-03-14 16:48:47 +01:00
parent 9c7bd6dc68
commit 2e486384a8
8 changed files with 202 additions and 17 deletions
@@ -12,10 +12,9 @@
import { KeyHandler } from '$lib/components/KeyHandler';
import { ConnectionLine } from '$lib/components/ConnectionLine';
import { useStore } from '$lib/store';
import type { SvelteFlowProps, SvelteFlowEvents } from './types';
import type { SvelteFlowProps } from './types';
type $$Props = SvelteFlowProps;
type $$Events = SvelteFlowEvents;
export let id: $$Props['id'] = '1';
export let fitView: $$Props['fitView'] = undefined;
@@ -98,6 +97,9 @@
style={style}
class={cc(['svelte-flow', className])}
data-testid="rf__wrapper"
on:dragover
on:drop
{...$$restProps}
>
<KeyHandler {selectionKey} {deleteKey} />
<Zoom {initialViewport}>