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

Function folderRowDragStartHandler

public/js/fileListView.js:6627–6652  ·  view source on GitHub ↗
(event, fullPath)

Source from the content-addressed store, hash-verified

6625}
6626
6627function folderRowDragStartHandler(event, fullPath) {
6628 try { cancelHoverPreview(); } catch (e) {}
6629
6630 if (!fullPath) return;
6631
6632 const srcParent = parentFolderOf(fullPath);
6633 const paneSourceId = getPaneSourceIdForElement(event.currentTarget) || getActivePaneSourceId();
6634
6635 const payload = {
6636 dragType: 'folder',
6637 folder: fullPath,
6638 sourceFolder: srcParent,
6639 sourceId: paneSourceId
6640 };
6641
6642 event.dataTransfer.effectAllowed = 'move';
6643 event.dataTransfer.setData('application/json', JSON.stringify(payload));
6644 event.dataTransfer.setData('text/plain', fullPath);
6645
6646 const label = fullPath.split('/').pop() || fullPath;
6647 const ghost = makeInlineFolderDragImage(label);
6648 event.dataTransfer.setDragImage(ghost, 10, 10);
6649 setTimeout(() => {
6650 try { document.body.removeChild(ghost); } catch (e) {}
6651 }, 0);
6652}
6653
6654function injectInlineFolderRows(fileListContent, folder, pageSubfolders) {
6655 const table = fileListContent.querySelector('table.filr-table');

Callers 1

injectInlineFolderRowsFunction · 0.85

Calls 6

cancelHoverPreviewFunction · 0.85
splitMethod · 0.80
parentFolderOfFunction · 0.70
getActivePaneSourceIdFunction · 0.70

Tested by

no test coverage detected