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

Method moveHandler

src/pages/quickTools/quickTools.js:258–273  ·  view source on GitHub ↗
(ev)

Source from the content-addressed store, hash-verified

256 };
257
258 const moveHandler = (ev) => {
259 if (!this.mouseDownInfo.isDrag) {
260 if (
261 Math.hypot(
262 ev.clientX - this.mouseDownInfo.x,
263 ev.clientY - this.mouseDownInfo.y,
264 ) > 5
265 ) {
266 this.mouseDownInfo.isDrag = true;
267 this.startDrag(target, this.mouseDownInfo);
268 }
269 }
270 if (this.dragState) {
271 this.updateDrag(ev);
272 }
273 };
274
275 const upHandler = () => {
276 document.removeEventListener("mousemove", moveHandler);

Callers

nothing calls this directly

Calls 2

startDragMethod · 0.95
updateDragMethod · 0.95

Tested by

no test coverage detected