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

blockly > BlockDragger > pixelsToWorkspaceUnits_

BlockDragger.pixelsToWorkspaceUnits_() method

Convert a coordinate object from pixels to workspace units, including a correction for mutator workspaces. This function does not consider differing origins. It simply scales the input's x and y values.


protected pixelsToWorkspaceUnits_(pixelCoord: Coordinate): Coordinate;


Parameter Type Description
pixelCoord Coordinate A coordinate with x and y values in CSS pixel units.



The input coordinate divided by the workspace scale.