Constructor

ZoomControls

new ZoomControls(workspace)

Class for a zoom controls.

Parameter

workspace

Blockly.Workspace

The workspace to sit in.

Value must not be null.

Methods

createDom

createDom() returns Element

Create the zoom controls.

Returns

non-null Element The zoom controls SVG group.

dispose

dispose()

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

init

init(bottom) returns number

Initialize the zoom controls.

Parameter

bottom

number

Distance from workspace bottom to bottom of controls.

Returns

number Distance from workspace bottom to the top of controls.

position

position()

Move the zoom controls to the bottom-right corner.