MCPcopy Create free account
hub / github.com/error311/FileRise / setLayoutFor

Function setLayoutFor

public/js/dragAndDrop.js:55–68  ·  view source on GitHub ↗
(cardId, zoneId)

Source from the content-addressed store, hash-verified

53 localStorage.setItem(LAYOUT_KEY, JSON.stringify(layout || {}));
54}
55function setLayoutFor(cardId, zoneId) {
56 const layout = readLayout();
57 const prevZone = layout[cardId];
58 layout[cardId] = zoneId;
59 if (ORDER_TRACKED_ZONES.includes(zoneId)) captureZoneOrder(layout, zoneId);
60 if (
61 prevZone &&
62 prevZone !== zoneId &&
63 ORDER_TRACKED_ZONES.includes(prevZone)
64 ) {
65 captureZoneOrder(layout, prevZone);
66 }
67 writeLayout(layout);
68}
69
70function themeToggleButton(btn) {
71 if (!btn) return;

Callers 1

makeCardDraggableFunction · 0.85

Calls 3

readLayoutFunction · 0.85
captureZoneOrderFunction · 0.85
writeLayoutFunction · 0.85

Tested by

no test coverage detected