From a136e0625f6bb3d21f85b56631cfb19c15ef9599 Mon Sep 17 00:00:00 2001 From: Claude Dev Date: Mon, 23 Mar 2026 23:41:33 +0100 Subject: [PATCH] Fix tutorial leaving tiles extremely small after completion GridStack v12 removeInternalForSave() deletes w/h properties from save() output when they equal minW/minH (or 1). This caused _removeDemoView() to pass h:undefined to grid.update(), which GridStack then defaulted to h:1, shrinking all tiles. Fix: save layout by reading node properties directly instead of using _grid.save(false), ensuring w and h are always preserved. --- src/static/js/tutorial.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/tutorial.js b/src/static/js/tutorial.js index b16f2ab..29b8c25 100644 --- a/src/static/js/tutorial.js +++ b/src/static/js/tutorial.js @@ -194,7 +194,7 @@ const Tutorial = { } // Aktuelles Layout sichern und Standard-Layout erzwingen if (typeof LayoutManager !== 'undefined' && LayoutManager._grid) { - this._savedState.savedLayout = LayoutManager._grid.save(false); + this._savedState.savedLayout = LayoutManager._grid.engine.nodes.map(function(n) { return { id: n.el ? n.el.getAttribute("gs-id") : n.id, x: n.x, y: n.y, w: n.w, h: n.h }; }); LayoutManager._applyLayout(LayoutManager.DEFAULT_LAYOUT); } // GridStack Resize triggern damit Kacheln korrekt positioniert werden