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.
Dieser Commit ist enthalten in:
Claude Dev
2026-03-23 23:41:33 +01:00
Ursprung c8279bc69b
Commit a136e0625f

Datei anzeigen

@@ -194,7 +194,7 @@ const Tutorial = {
} }
// Aktuelles Layout sichern und Standard-Layout erzwingen // Aktuelles Layout sichern und Standard-Layout erzwingen
if (typeof LayoutManager !== 'undefined' && LayoutManager._grid) { 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); LayoutManager._applyLayout(LayoutManager.DEFAULT_LAYOUT);
} }
// GridStack Resize triggern damit Kacheln korrekt positioniert werden // GridStack Resize triggern damit Kacheln korrekt positioniert werden