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

Function captureZoneOrder

public/js/dragAndDrop.js:409–421  ·  view source on GitHub ↗
(layout, zoneId)

Source from the content-addressed store, hash-verified

407}
408
409function captureZoneOrder(layout, zoneId) {
410 if (!layout || !ORDER_TRACKED_ZONES.includes(zoneId)) return;
411 const host = getZoneHost(zoneId);
412 if (!host) return;
413 const ids = Array.from(
414 host.querySelectorAll('#uploadCard, #folderManagementCard')
415 ).map(el => el.id).filter(Boolean);
416
417 if (!ids.length) return;
418
419 layout[ORDER_DATA_KEY] = layout[ORDER_DATA_KEY] || {};
420 layout[ORDER_DATA_KEY][zoneId] = ids;
421}
422
423function applyZoneOrder(layout, zoneId, placedSet) {
424 if (!placedSet) return;

Callers 2

setLayoutForFunction · 0.85
saveCurrentLayoutFunction · 0.85

Calls 1

getZoneHostFunction · 0.85

Tested by

no test coverage detected