MCPcopy Create free account
hub / github.com/TodePond/ScreenPond / getCanvasPosition

Function getCanvasPosition

source/position.js:14–19  ·  view source on GitHub ↗
(context, viewPosition)

Source from the content-addressed store, hash-verified

12};
13
14export const getCanvasPosition = (context, viewPosition) => {
15 const { canvas } = context;
16 const [x, y] = viewPosition;
17 const canvasPosition = [x * canvas.width, y * canvas.height];
18 return canvasPosition;
19};
20
21export const getCanvasPositions = (context, viewPositions) => {
22 const canvasPositions = viewPositions.map((viewPosition) =>

Callers 1

getCanvasPositionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected