Stay organized with collections Save and categorize content based on your preferences.

blockly > Options

Options class

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


export declare class Options 


Constructor Modifiers Description
(constructor)(options) Constructs a new instance of the Options class


Property Modifiers Type Description
collapse boolean
comments boolean
disable boolean
getMetrics? (() => Metrics) (Optional) A function that returns a metrics object that describes the current workspace.
gridOptions GridOptions
gridPattern SVGElement | null The SVG element for the grid pattern. Created during injection.
hasCategories boolean
hasCss boolean
hasScrollbars boolean
hasSounds boolean
hasTrashcan boolean
horizontalLayout boolean
languageTree toolbox.ToolboxInfo | null
maxBlocks number
maxInstances { [key: string]: number; } | null
maxTrashcanContents number
modalInputs boolean
moveOptions MoveOptions
oneBasedIndex boolean
parentWorkspace WorkspaceSvg | null
pathToMedia string
plugins { [key: string]: (new (...p1: any[]) => any) | string; }
readOnly boolean
renderer string
rendererOverrides { [rendererConstant: string]: any; } | null
RTL boolean
setMetrics? ((p1: { x?: number; y?: number; }) => void) (Optional) If set, sets the translation of the workspace to match the scrollbars. A function that sets the translation of the workspace to match the scrollbars. The argument Contains an x and/or y property which is a float between 0 and 1 specifying the degree of scrolling.
theme Theme
toolboxPosition toolbox.Position
zoomOptions ZoomOptions