feat(svelte): ssr fitView

This commit is contained in:
moklick
2023-10-23 18:05:45 +02:00
parent 9351a492ac
commit 2435a0da8f
6 changed files with 39 additions and 12 deletions
@@ -10,12 +10,14 @@
export let initialEdges: $$Props['initialEdges'] = undefined;
export let initialWidth: $$Props['initialWidth'] = undefined;
export let initialHeight: $$Props['initialHeight'] = undefined;
export let fitView: $$Props['fitView'] = undefined;
const store = createStore({
nodes: initialNodes,
edges: initialEdges,
width: initialWidth,
height: initialHeight
height: initialHeight,
fitView
});
setContext(key, {
@@ -5,4 +5,5 @@ export type SvelteFlowProviderProps = {
initialEdges?: Edge[];
initialWidth?: number;
initialHeight?: number;
fitView?: boolean;
};