From d1662f1703ef46ed98a2367d6398427b32d54d56 Mon Sep 17 00:00:00 2001
From: Peter
Date: Wed, 25 Oct 2023 09:31:04 +0200
Subject: [PATCH] fix(svelte) resizing updates width & height in the store
correctly
---
.../svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte b/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte
index d9eb867d..cfa66d67 100644
--- a/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte
+++ b/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte
@@ -106,6 +106,12 @@
};
});
+ // Update width & height on resize
+ $: {
+ store.width.set(clientWidth);
+ store.height.set(clientHeight);
+ }
+
// this updates the store for simple changes
// where the prop names equals the store name
$: {