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

Function initDragAndDrop

public/js/dragAndDrop.js:1432–1461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1430}
1431
1432export function initDragAndDrop() {
1433 function run() {
1434 // 1) Layout on first paint
1435 applyUserLayoutOrDefault();
1436 loadHeaderOrder();
1437
1438 // 2) Paint controls/UI
1439 ensureZonesToggle();
1440 updateZonesToggleUI();
1441 applyCollapsedBodyClass();
1442
1443 // 3) Make cards draggable
1444 getCards().forEach(makeCardDraggable);
1445
1446 // 4) Enforce responsive (and keep doing so)
1447 let raf = null;
1448 const onResize = () => {
1449 if (raf) cancelAnimationFrame(raf);
1450 raf = requestAnimationFrame(() => enforceResponsiveZones());
1451 };
1452 window.addEventListener('resize', onResize);
1453 enforceResponsiveZones();
1454 }
1455
1456 if (document.readyState === 'loading') {
1457 document.addEventListener('DOMContentLoaded', run);
1458 } else {
1459 run();
1460 }
1461}

Callers 1

initializeAppFunction · 0.85

Calls 1

runFunction · 0.85

Tested by

no test coverage detected