Skip to main content

Home > blockly > utils > Metrics

utils.Metrics interface

Signature:

export interface Metrics 

Properties

PropertyModifiersTypeDescription
absoluteLeftnumberLeft-edge of the visible portion of the workspace, relative to the blocklyDiv.
absoluteTopnumberTop-edge of the visible portion of the workspace, relative to the blocklyDiv.
contentHeightnumberHeight of the content.
contentLeftnumberLeft-edge of the content relative to the workspace origin.
contentTopnumberTop-edge of the content, relative to the workspace origin.
contentWidthnumberWidth of the content.
flyoutHeightnumberHeight of the flyout if it is always open. Otherwise zero.
flyoutWidthnumberWidth of the flyout if it is always open. Otherwise zero.
scrollHeightnumberHeight of the scroll area.
scrollLeftnumberLeft-edge of the scroll area relative to the workspace origin.
scrollTopnumberTop-edge of the scroll area, relative to the workspace origin.
scrollWidthnumberWidth of the scroll area.
svgHeightnumberHeight of the Blockly div (the view + the toolbox, simple of otherwise).
svgWidthnumberWidth of the Blockly div (the view + the toolbox, simple or otherwise).
toolboxHeightnumberHeight of the toolbox, if it exists. Otherwise zero.
toolboxPositionnumberTop, bottom, left or right. Use TOOLBOX_AT constants to compare.
toolboxWidthnumberWidth of the toolbox, if it exists. Otherwise zero.
viewHeightnumberHeight of the visible portion of the workspace.
viewLeftnumberLeft-edge of the visible portion of the workspace, relative to the workspace origin.
viewTopnumberTop-edge of the visible portion of the workspace, relative to the workspace origin.
viewWidthnumberWidth of the visible portion of the workspace.