Blockly. Options
Parse the user-specified options, using reasonable defaults where behaviour is unspecified.
Constructor
Options
new Options(options)
Parameter |
|
---|---|
options |
Dictionary of options. Specification: https://developers.google.com/blockly/guides/get-started/web#configuration Value must not be null. |
Properties
collapse
boolean
comments
boolean
disable
boolean
getMetrics
(undefined or function() returns non-null Blockly.utils.Metrics)
A function that returns a metrics object that describes the current workspace.
gridOptions
non-null Blockly.Options.GridOptions
gridPattern
nullable SVGElement
The SVG element for the grid pattern. Created during injection.
hasCategories
boolean
hasCss
boolean
hasScrollbars
- Deprecated
- January 2019
hasSounds
boolean
hasTrashcan
boolean
horizontalLayout
boolean
languageTree
nullable Blockly.utils.toolbox.ToolboxInfo
maxBlocks
number
maxInstances
nullable Object with number properties
maxTrashcanContents
number
moveOptions
non-null Blockly.Options.MoveOptions
oneBasedIndex
boolean
parentWorkspace
nullable Blockly.WorkspaceSvg
The parent of the current workspace, or null if there is no parent workspace. We can assert that this is of type WorkspaceSvg as opposed to Workspace as this is only used in a rendered workspace.
pathToMedia
string
plugins
non-null Object with (function(constructs unknown, repeatable unknown) or string) properties
Map of plugin type to name of registered plugin or plugin class.
readOnly
boolean
renderer
string
rendererOverrides
nullable Object
RTL
boolean
setMetrics
(undefined or function(non-null {x:number, y:number}) returns void)
If set, sets the translation of the workspace to match the scrollbars.
theme
non-null Blockly.Theme
toolboxPosition
non-null Blockly.utils.toolbox.Position
zoomOptions
non-null Blockly.Options.ZoomOptions
Abstract types
GridOptions
{colour: string, length: number, snap: boolean, spacing: number}
Grid Options.
MoveOptions
{drag: boolean, scrollbars: (boolean or non-null Blockly.Options.ScrollbarOptions), wheel: boolean}
Move Options.
ScrollbarOptions
{horizontal: boolean, vertical: boolean}
Scrollbar Options.
ZoomOptions
{controls: boolean, maxScale: number, minScale: number, pinch: boolean, scaleSpeed: number, startScale: number, wheel: boolean}
Zoom Options.