Constructor

Options

new Options(options)

Parse the user-specified options, using reasonable defaults where behaviour is unspecified.

Parameter

options

Object

Dictionary of options. Specification: https://developers.google.com/blockly/guides/get-started/web#configuration

Value must not be null.

Properties

getMetrics

Return an object with the metrics required to size the workspace.

Returns

Object Contains size and position metrics, or null.

parentWorkspace

Blockly.Workspace

The parent of the current workspace, or null if there is no parent workspace.

setMetrics

If set, sets the translation of the workspace to match the scrollbars.

Method

parseToolboxTree

static

parseToolboxTree(tree) returns Node

Parse the provided toolbox tree into a consistent DOM format.

Parameter

tree

(Node or string)

DOM tree of blocks, or text representation of same.

Returns

Node DOM tree of blocks, or null.