Constructor

ZoomControls

new ZoomControls(workspace)

Class for a zoom controls.

Parameter

workspace

Blockly.WorkspaceSvg

The workspace to sit in.

Value must not be null.

Methods

createDom

createDom() returns SVGElement

Create the zoom controls.

Returns

non-null SVGElement The zoom controls SVG group.

dispose

dispose()

Dispose of this zoom controls. Unlink from all DOM elements to prevent memory leaks.

init

init(verticalSpacing) returns number

Initialize the zoom controls.

Parameter

verticalSpacing

number

Vertical distances from workspace edge to the same edge of the controls.

Returns

number Vertical distance from workspace edge to the opposite edge of the controls.

position

position()

Position the zoom controls. It is positioned in the opposite corner to the corner the categories/toolbox starts at.