Interface: Metrics
Defined in: packages/blockly/core/utils/metrics.ts:9
Properties index
| Property | Description |
|---|---|
| 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. |
| 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. |
| svgHeight | Height of the Blockly div (the view + the toolbox, simple of otherwise). |
| svgWidth | Width of the Blockly div (the view + the toolbox, simple or otherwise). |
| toolboxWidth | Width of the toolbox, if it exists. Otherwise zero. |
| toolboxHeight | Height of the toolbox, if it exists. Otherwise zero. |
| toolboxPosition | Top, bottom, left or right. Use TOOLBOX_AT constants to compare. |
| flyoutWidth | Width of the flyout if it is always open. Otherwise zero. |
| flyoutHeight | Height of the flyout if it is always open. Otherwise zero. |
Properties
viewHeight
viewHeight: number;
Defined in: packages/blockly/core/utils/metrics.ts:11
Height of the visible portion of the workspace.
viewWidth
viewWidth: number;
Defined in: packages/blockly/core/utils/metrics.ts:14
Width of the visible portion of the workspace.
contentHeight
contentHeight: number;
Defined in: packages/blockly/core/utils/metrics.ts:17
Height of the content.
contentWidth
contentWidth: number;
Defined in: packages/blockly/core/utils/metrics.ts:20
Width of the content.
scrollHeight
scrollHeight: number;
Defined in: packages/blockly/core/utils/metrics.ts:23
Height of the scroll area.
scrollWidth
scrollWidth: number;
Defined in: packages/blockly/core/utils/metrics.ts:26
Width of the scroll area.
viewTop
viewTop: number;
Defined in: packages/blockly/core/utils/metrics.ts:32
Top-edge of the visible portion of the workspace, relative to the workspace origin.
viewLeft
viewLeft: number;
Defined in: packages/blockly/core/utils/metrics.ts:38
Left-edge of the visible portion of the workspace, relative to the workspace origin.
contentTop
contentTop: number;
Defined in: packages/blockly/core/utils/metrics.ts:41
Top-edge of the content, relative to the workspace origin.
contentLeft
contentLeft: number;
Defined in: packages/blockly/core/utils/metrics.ts:44
Left-edge of the content relative to the workspace origin.
scrollTop
scrollTop: number;
Defined in: packages/blockly/core/utils/metrics.ts:47
Top-edge of the scroll area, relative to the workspace origin.
scrollLeft
scrollLeft: number;
Defined in: packages/blockly/core/utils/metrics.ts:50
Left-edge of the scroll area relative to the workspace origin.
absoluteTop
absoluteTop: number;
Defined in: packages/blockly/core/utils/metrics.ts:56
Top-edge of the visible portion of the workspace, relative to the blocklyDiv.
absoluteLeft
absoluteLeft: number;
Defined in: packages/blockly/core/utils/metrics.ts:62
Left-edge of the visible portion of the workspace, relative to the blocklyDiv.
svgHeight
svgHeight: number;
Defined in: packages/blockly/core/utils/metrics.ts:67
Height of the Blockly div (the view + the toolbox, simple of otherwise).
svgWidth
svgWidth: number;
Defined in: packages/blockly/core/utils/metrics.ts:70
Width of the Blockly div (the view + the toolbox, simple or otherwise).
toolboxWidth
toolboxWidth: number;
Defined in: packages/blockly/core/utils/metrics.ts:73
Width of the toolbox, if it exists. Otherwise zero.
toolboxHeight
toolboxHeight: number;
Defined in: packages/blockly/core/utils/metrics.ts:76
Height of the toolbox, if it exists. Otherwise zero.
toolboxPosition
toolboxPosition: number;
Defined in: packages/blockly/core/utils/metrics.ts:79
Top, bottom, left or right. Use TOOLBOX_AT constants to compare.
flyoutWidth
flyoutWidth: number;
Defined in: packages/blockly/core/utils/metrics.ts:82
Width of the flyout if it is always open. Otherwise zero.
flyoutHeight
flyoutHeight: number;
Defined in: packages/blockly/core/utils/metrics.ts:85
Height of the flyout if it is always open. Otherwise zero.