Stay organized with collections Save and categorize content based on your preferences.

blockly > utils > screenToWsCoordinates

utils.screenToWsCoordinates() function

Use **Blockly.utils.svgMath.screenToWsCoordinates** instead.

Converts screen coordinates to workspace coordinates.

Signature:

export declare function screenToWsCoordinates(ws: WorkspaceSvg, screenCoordinates: Coordinate): Coordinate;

Parameters

Parameter Type Description
ws WorkspaceSvg The workspace to find the coordinates on.
screenCoordinates Coordinate The screen coordinates to be converted to workspace coordinates

Returns:

Coordinate

The workspace coordinates.