MCPcopy Index your code
hub / github.com/cifertech/DisplayKit / clientToArtboardPx

Function clientToArtboardPx

app.js:512–519  ·  view source on GitHub ↗
(clientX, clientY)

Source from the content-addressed store, hash-verified

510}
511
512function clientToArtboardPx(clientX, clientY) {
513 if (!preview) return { x: 0, y: 0 };
514 const pr = preview.getBoundingClientRect();
515 if (pr.width <= 0 || pr.height <= 0) return { x: 0, y: 0 };
516 const lx = (clientX - pr.left) * dispWidth / pr.width;
517 const ly = (clientY - pr.top) * dispHeight / pr.height;
518 return { x: lx, y: ly };
519}
520
521function clearDistanceHints() {
522 if (!preview) return;

Callers 2

enableRotateFunction · 0.85
onRotMoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected