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

Function addDragClass

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

Source from the content-addressed store, hash-verified

6 const { deleteLayoutItem, insertLayoutItem, getIndexById } = useLayoutConfigStore();
7 const { containerState } = useLayoutContainerStore();
8 const addDragClass = (
9 dom: HTMLElement,
10 targetClassName = "layout-card-container",
11 actionClassName = "global-layout-card-dragover"
12 ) => {
13 if (!dom) return;
14 const div = findParentWithClass(dom, targetClassName);
15 if (div) div.classList.add(actionClassName);
16 };
17 const removeDragClass = (
18 dom: HTMLElement,
19 targetClassName = "layout-card-container",

Callers 2

dragenterFunction · 0.85
newAreaDragenterFunction · 0.85

Calls 2

findParentWithClassFunction · 0.90
addMethod · 0.80

Tested by

no test coverage detected