MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / onDragMove

Function onDragMove

src/components/referencesPanel/index.js:85–97  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

83 }
84
85 function onDragMove(e) {
86 if (!isDragging) return;
87 e.preventDefault();
88 currentY = e.touches ? e.touches[0].clientY : e.clientY;
89 const deltaY = currentY - startY;
90
91 if (deltaY > 0) {
92 $panel.style.transform = `translateY(${deltaY}px)`;
93 } else if (!state.expanded) {
94 const expansion = Math.min(Math.abs(deltaY), 100);
95 $panel.style.maxHeight = `${60 + (expansion / 100) * 25}vh`;
96 }
97 }
98
99 function onDragEnd() {
100 isDragging = false;

Callers

nothing calls this directly

Calls 1

preventDefaultMethod · 0.45

Tested by

no test coverage detected