Skip to main content

Interface: Metrics

Defined in: packages/blockly/core/utils/metrics.ts:9

Properties index​

PropertyDescription
viewHeightHeight of the visible portion of the workspace.
viewWidthWidth of the visible portion of the workspace.
contentHeightHeight of the content.
contentWidthWidth of the content.
scrollHeightHeight of the scroll area.
scrollWidthWidth of the scroll area.
viewTopTop-edge of the visible portion of the workspace, relative to the workspace origin.
viewLeftLeft-edge of the visible portion of the workspace, relative to the workspace origin.
contentTopTop-edge of the content, relative to the workspace origin.
contentLeftLeft-edge of the content relative to the workspace origin.
scrollTopTop-edge of the scroll area, relative to the workspace origin.
scrollLeftLeft-edge of the scroll area relative to the workspace origin.
absoluteTopTop-edge of the visible portion of the workspace, relative to the blocklyDiv.
absoluteLeftLeft-edge of the visible portion of the workspace, relative to the blocklyDiv.
svgHeightHeight of the Blockly div (the view + the toolbox, simple of otherwise).
svgWidthWidth of the Blockly div (the view + the toolbox, simple or otherwise).
toolboxWidthWidth of the toolbox, if it exists. Otherwise zero.
toolboxHeightHeight of the toolbox, if it exists. Otherwise zero.
toolboxPositionTop, bottom, left or right. Use TOOLBOX_AT constants to compare.
flyoutWidthWidth of the flyout if it is always open. Otherwise zero.
flyoutHeightHeight 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.