diff --git a/src/static/js/layout.js b/src/static/js/layout.js index ba699c0..fdf58f1 100644 --- a/src/static/js/layout.js +++ b/src/static/js/layout.js @@ -10,7 +10,8 @@ const LayoutManager = { _hiddenTiles: {}, DEFAULT_LAYOUT: [ - { id: 'lagebild', x: 0, y: 0, w: 6, h: 4, minW: 4, minH: 4 }, + { id: 'zusammenfassung', x: 0, y: 0, w: 12, h: 2, minW: 4, minH: 2 }, + { id: 'lagebild', x: 0, y: 2, w: 6, h: 4, minW: 4, minH: 4 }, { id: 'faktencheck', x: 6, y: 0, w: 6, h: 4, minW: 4, minH: 4 }, { id: 'quellen', x: 0, y: 4, w: 12, h: 2, minW: 6, minH: 2 }, { id: 'timeline', x: 0, y: 5, w: 12, h: 4, minW: 6, minH: 4 }, @@ -18,6 +19,7 @@ const LayoutManager = { ], TILE_MAP: { + zusammenfassung: '#zusammenfassung-card', lagebild: '.incident-analysis-summary', faktencheck: '.incident-analysis-factcheck', quellen: '.source-overview-card', @@ -43,6 +45,12 @@ const LayoutManager = { const saved = this._load(); if (saved) { + // Migration: Neue Kacheln ergaenzen die in alten Layouts fehlen + this.DEFAULT_LAYOUT.forEach(def => { + if (!saved.find(s => s.id === def.id)) { + saved.unshift({ id: def.id, x: def.x, y: def.y, w: def.w, h: def.h, visible: true }); + } + }); this._applyLayout(saved); }