fix(svelte): handle nodeOrigin prop

This commit is contained in:
moklick
2024-06-27 16:58:48 +02:00
parent 609f7ed792
commit 7375e81a49
8 changed files with 53 additions and 23 deletions
@@ -11,12 +11,14 @@
export let initialWidth: $$Props['initialWidth'] = undefined;
export let initialHeight: $$Props['initialHeight'] = undefined;
export let fitView: $$Props['fitView'] = undefined;
export let nodeOrigin: $$Props['nodeOrigin'] = undefined;
const store = createStore({
nodes: initialNodes,
edges: initialEdges,
width: initialWidth,
height: initialHeight,
nodeOrigin,
fitView
});
@@ -1,4 +1,5 @@
import type { Edge, Node } from '$lib/types';
import type { NodeOrigin } from '@xyflow/system';
export type SvelteFlowProviderProps = {
initialNodes?: Node[];
@@ -6,4 +7,5 @@ export type SvelteFlowProviderProps = {
initialWidth?: number;
initialHeight?: number;
fitView?: boolean;
nodeOrigin?: NodeOrigin;
};