blockly > utils > Metrics

utils.Metrics interface

Signature:

export interface Metrics 

Properties

Property Modifiers Type Description
absoluteLeft number Left-edge of the visible portion of the workspace, relative to the blocklyDiv.
absoluteTop number Top-edge of the visible portion of the workspace, relative to the blocklyDiv.
contentHeight number Height of the content.
contentLeft number Left-edge of the content relative to the workspace origin.
contentTop number Top-edge of the content, relative to the workspace origin.
contentWidth number Width of the content.
flyoutHeight number Height of the flyout if it is always open. Otherwise zero.
flyoutWidth number Width of the flyout if it is always open. Otherwise zero.
scrollHeight number Height of the scroll area.
scrollLeft number Left-edge of the scroll area relative to the workspace origin.
scrollTop number Top-edge of the scroll area, relative to the workspace origin.
scrollWidth number Width of the scroll area.
svgHeight number Height of the Blockly div (the view + the toolbox, simple of otherwise).
svgWidth number Width of the Blockly div (the view + the toolbox, simple or otherwise).
toolboxHeight number Height of the toolbox, if it exists. Otherwise zero.
toolboxPosition number Top, bottom, left or right. Use TOOLBOX_AT constants to compare.
toolboxWidth number Width of the toolbox, if it exists. Otherwise zero.
viewHeight number Height of the visible portion of the workspace.
viewLeft number Left-edge of the visible portion of the workspace, relative to the workspace origin.
viewTop number Top-edge of the visible portion of the workspace, relative to the workspace origin.
viewWidth number Width of the visible portion of the workspace.