LayoutManager: Zusammenfassung-Kachel registrieren + Layout-Migration

- zusammenfassung in DEFAULT_LAYOUT und TILE_MAP eingetragen
- Toggle-Button funktioniert jetzt (Kachel ein-/ausblenden)
- Migration: Gespeicherte Layouts ohne neue Kacheln werden
  automatisch ergaenzt (kein manueller Reset noetig)
Dieser Commit ist enthalten in:
claude-dev
2026-04-11 21:32:45 +00:00
Ursprung c59ba4f4af
Commit d2d958e0cd

Datei anzeigen

@@ -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);
}