MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / removeDragClass

Function removeDragClass

frontend/src/hooks/useCardDragMove.ts:17–25  ·  view source on GitHub ↗
(
    dom: HTMLElement,
    targetClassName = "layout-card-container",
    actionClassName = "global-layout-card-dragover"
  )

Source from the content-addressed store, hash-verified

15 if (div) div.classList.add(actionClassName);
16 };
17 const removeDragClass = (
18 dom: HTMLElement,
19 targetClassName = "layout-card-container",
20 actionClassName = "global-layout-card-dragover"
21 ) => {
22 if (!dom) return;
23 const div = findParentWithClass(dom, targetClassName);
24 if (div) div.classList.remove(actionClassName);
25 };
26
27 const moveCardItem = (sourceId: string, targetId: string, newArea = false) => {
28 if (sourceId === targetId) return;

Callers 4

dragleaveFunction · 0.85
dropFunction · 0.85
dropToNewAreaFunction · 0.85
newAreaDragleaveFunction · 0.85

Calls 1

findParentWithClassFunction · 0.90

Tested by

no test coverage detected