blockly > IMetricsManager > getContentMetrics

IMetricsManager.getContentMetrics() method

Gets content metrics in either pixel or workspace coordinates. The content area is a rectangle around all the top bounded elements on the workspace (workspace comments and blocks).

Signature:

getContentMetrics(opt_getWorkspaceCoordinates?: boolean): ContainerRegion;

Parameters

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

Returns:

ContainerRegion

The metrics for the content container.