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

Function updateTopZoneLayout

public/js/dragAndDrop.js:1111–1135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1109 sb.style.display = (isZonesCollapsed() || !any) ? 'none' : 'block';
1110}
1111function updateTopZoneLayout() {
1112 const top = getTopZone();
1113 const left = getLeftCol();
1114 const right = getRightCol();
1115 const hasUpload = !!top?.querySelector('#uploadCard');
1116 const hasFolder = !!top?.querySelector('#folderManagementCard');
1117
1118 if (left && right) {
1119 if (hasUpload && !hasFolder) {
1120 right.style.display = 'none';
1121 left.style.display = '';
1122 left.style.margin = '0 auto';
1123 } else if (!hasUpload && hasFolder) {
1124 left.style.display = 'none';
1125 right.style.display = '';
1126 right.style.margin = '0 auto';
1127 } else {
1128 left.style.display = '';
1129 right.style.display = '';
1130 left.style.margin = '';
1131 right.style.margin = '';
1132 }
1133 }
1134 if (top) top.style.display = (hasUpload || hasFolder) ? '' : 'none';
1135}
1136
1137// --- sidebar placeholder while dragging (only when empty) ---
1138function ensureSidebarPlaceholder() {

Callers 6

placeCardInZoneFunction · 0.85
enforceResponsiveZonesFunction · 0.85
setZonesCollapsedFunction · 0.85
makeCardDraggableFunction · 0.85
applyUserLayoutOrDefaultFunction · 0.85

Calls 3

getTopZoneFunction · 0.85
getLeftColFunction · 0.85
getRightColFunction · 0.85

Tested by

no test coverage detected