Skip to main content

blockly > MetricsManager > getScrollMetrics

MetricsManager.getScrollMetrics() method

Returns the metrics for the scroll area of the workspace.

Signature:

getScrollMetrics(opt_getWorkspaceCoordinates?: boolean, opt_viewMetrics?: ContainerRegion, opt_contentMetrics?: ContainerRegion): ContainerRegion;

Parameters

Parameter

Type

Description

opt_getWorkspaceCoordinates

boolean

(Optional) True to get the scroll metrics in workspace coordinates, false to get them in pixel coordinates.

opt_viewMetrics

ContainerRegion

(Optional) The view metrics if they have been previously computed. Passing in null may cause the view metrics to be computed again, if it is needed.

opt_contentMetrics

ContainerRegion

(Optional) The content metrics if they have been previously computed. Passing in null may cause the content metrics to be computed again, if it is needed.

Returns:

ContainerRegion

The metrics for the scroll container.