MCPcopy Create free account
hub / github.com/cifertech/DisplayKit / onMove

Function onMove

app.js:6492–6500  ·  view source on GitHub ↗
(ev)

Source from the content-addressed store, hash-verified

6490 const startX = e.clientX;
6491 const base = isRotation ? (parseFloat(inputEl.value) || 0) : (parseInt(inputEl.value, 10) || 0);
6492 function onMove(ev) {
6493 const dx = ev.clientX - startX;
6494 const scale = ev.shiftKey ? 2 : ev.altKey ? 0.25 : 1;
6495 const next = isRotation
6496 ? Math.round(base + dx * 0.35 * scale)
6497 : Math.round(base + dx * 0.12 * scale);
6498 inputEl.value = String(next);
6499 inputEl.dispatchEvent(new Event("input", { bubbles: true }));
6500 }
6501 function onUp() {
6502 document.removeEventListener("mousemove", onMove);
6503 document.removeEventListener("mouseup", onUp);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected