Home > PCB_Document > getCanvasOrigin
PCB_Document.getCanvasOrigin() method
Get the offset coordinate of the canvas origin relative to the data origin
Signature
typescript
function getCanvasOrigin(): Promise<{ offsetX: number; offsetY: number }>;1
Returns
Promise<{ offsetX: number; offsetY: number }>
The offset coordinate of the canvas origin relative to the data origin
Remarks
The coordinates displayed on the EasyEDA Pro front end are all relative to the canvas origin;
The EasyEDA Pro API uses the data origin;
If the returned data is { canvasOriginOffsetX: 100, canvasOriginOffsetY: 200 }, it means the canvas origin is at a position 100 units to the right and 200 units up from the data origin;
The units here are data-level units, which are equivalent to mil on the canvas level in span