diff --git a/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte b/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte index d9eb867d..36209b17 100644 --- a/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte +++ b/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte @@ -106,6 +106,14 @@ }; }); + // Update width & height on resize + $: { + if (clientWidth !== undefined && clientHeight !== undefined) { + store.width.set(clientWidth); + store.height.set(clientHeight); + } + } + // this updates the store for simple changes // where the prop names equals the store name $: {