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

blockly > IMetricsManager > getViewMetrics

IMetricsManager.getViewMetrics() method

Gets the metrics for the visible workspace in either pixel or workspace coordinates. The visible workspace does not include the toolbox or flyout.


getViewMetrics(opt_getWorkspaceCoordinates?: boolean): ContainerRegion;


Parameter Type Description
opt_getWorkspaceCoordinates boolean (Optional) True to get the view metrics in workspace coordinates, false to get them in pixel coordinates.



The width, height, top and left of the viewport in either workspace coordinates or pixel coordinates.