(clientX, clientY)
| 510 | } |
| 511 | |
| 512 | function 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 | |
| 521 | function clearDistanceHints() { |
| 522 | if (!preview) return; |
no outgoing calls
no test coverage detected