Interface: Metrics

Properties

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 or undefined)

Height of the flyout if it is always open. Otherwise zero.

flyoutWidth

(number or undefined)

Width of the flyout if it is always open. Otherwise zero.

svgHeight

(number or undefined)

Height of the Blockly div (the view + the toolbox, simple of otherwise).

svgWidth

(number or undefined)

Width of the Blockly div (the view + the toolbox, simple or otherwise).

toolboxHeight

(number or undefined)

Height of the toolbox, if it exists. Otherwise zero.

toolboxPosition

(number or undefined)

Top, bottom, left or right. Use TOOLBOX_AT constants to compare.

toolboxWidth

(number or undefined)

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.