Calculates metrics for a flyout's workspace. The metrics are mainly used to size scrollbars for the flyout.
The flyout's workspace.
The flyout.
Gets the absolute left and absolute top in pixel coordinates. This is where the visible workspace starts in relation to the SVG container.
The absolute metrics for the workspace.
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).
Optionalopt_getWorkspaceCoordinates: booleanTrue to get the content metrics in workspace coordinates, false to get them in pixel coordinates.
The metrics for the content container.
Gets the width and the height of the flyout on the workspace in pixel coordinates. Returns 0 for the width and height if the workspace has a category toolbox instead of a simple toolbox.
Optionalopt_own: booleanWhether to only return the workspace's own flyout.
The width and height of the flyout.
Returns an object with all the metrics required to size scrollbars for a top level workspace. The following properties are computed: Coordinate system: pixel coordinates, -left, -up, +right, +down .viewHeight: Height of the visible portion of the workspace. .viewWidth: Width of the visible portion of the workspace. .contentHeight: Height of the content. .contentWidth: Width of the content. .scrollHeight: Height of the scroll area. .scrollWidth: Width of the scroll area. .svgHeight: Height of the Blockly div (the view + the toolbox, simple or otherwise), .svgWidth: Width of the Blockly div (the view + the toolbox, simple or otherwise), .viewTop: Top-edge of the visible portion of the workspace, relative to the workspace origin. .viewLeft: Left-edge of the visible portion of the workspace, relative to the workspace origin. .contentTop: Top-edge of the content, relative to the workspace origin. .contentLeft: Left-edge of the content relative to the workspace origin. .scrollTop: Top-edge of the scroll area, relative to the workspace origin. .scrollLeft: Left-edge of the scroll area relative to the workspace origin. .absoluteTop: Top-edge of the visible portion of the workspace, relative to the blocklyDiv. .absoluteLeft: Left-edge of the visible portion of the workspace, relative to the blocklyDiv. .toolboxWidth: Width of the toolbox, if it exists. Otherwise zero. .toolboxHeight: Height of the toolbox, if it exists. Otherwise zero. .flyoutWidth: Width of the flyout if it is always open. Otherwise zero. .flyoutHeight: Height of the flyout if it is always open. Otherwise zero. .toolboxPosition: Top, bottom, left or right. Use TOOLBOX_AT constants to compare.
Contains size and position metrics of a top level workspace.
Returns the metrics for the scroll area of the workspace.
Optionalopt_getWorkspaceCoordinates: booleanTrue to get the scroll metrics in workspace coordinates, false to get them in pixel coordinates.
Optionalopt_viewMetrics: ContainerRegionThe view metrics if they have been previously computed. Passing in null may cause the view metrics to be computed again, if it is needed.
Optionalopt_contentMetrics: ContainerRegionThe content metrics if they have been previously computed. Passing in null may cause the content metrics to be computed again, if it is needed.
The metrics for the scroll container.
Gets the width, height and position of the toolbox on the workspace in pixel coordinates. Returns 0 for the width and height if the workspace has a simple toolbox instead of a category toolbox. To get the width and height of a simple toolbox
The object with the width, height and position of the toolbox.
Gets the metrics for the visible workspace in either pixel or workspace coordinates. The visible workspace does not include the toolbox or flyout.
Optionalopt_getWorkspaceCoordinates: booleanTrue 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.
Fake class which should be extended to avoid inheriting static properties