Skip to main content

Home > 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

ParameterTypeDescription
opt_getWorkspaceCoordinatesboolean(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.