@setoelkahfi / svara / commits / dbb06aa

fix: panel size updates correctly on mount

Sidebar panel size updates with window size once the component is mounted

mellbacon committed May 20, 2023 at 13:43 UTC dbb06aa5b2ef2e51a5badde6b49d5e2e5da0065a
1 file changed +5 -4
src/App.svelte
+5 -4
@@ -24,9 +24,6 @@
24 appWindow.onResized((e) => {
25 resolution.set(e.payload.width);
26 updateMinPanelSize();
27 - if (panelSize < minPanelSize) {
28 - panelSize = minPanelSize;
29 - }
27 })
28 })
29
@@ -53,7 +50,11 @@
50 else if ($resolution > 1300) {
51 minPanelSize = 10;
52 }
56 - }
53 +
54 + if (panelSize < minPanelSize) {
55 + panelSize = minPanelSize;
56 + }
57 +}
58 </script>
59
60 <Header />