blockly > 選項

選項類別

在未指定行為的情況下,使用合理的預設值剖析使用者指定選項。

Signature:

export declare class Options 

建構函式

建構函式 修飾符 說明
(建構函式)(選項) 建構 Options 類別的新執行個體

屬性

屬性 修飾符 類型 說明
收合 boolean
留言 boolean
停用 boolean
getMetrics? () => 指標 (選用) 這個函式會傳回指標物件來描述目前工作區。
gridOptions GridOptions
gridPattern SVGElement | 空值 格線模式的 SVG 元素。在插入期間建立。
hasCategories boolean
hasCss boolean
hasScrollbars boolean
hasSounds boolean
hasTrashcan boolean
horizontalLayout boolean
languageTree toolbox.ToolboxInfo | null
maxBlocks 號碼
maxInstances { [key: string]: number; } | null
maxTrashcanContents 號碼
modalInputs boolean
moveOptions MoveOptions
oneBasedIndex boolean
parentWorkspace WorkspaceSvg | 空值
pathToMedia 字串
外掛程式 { [key: string]: (new (...p1: any[]) => any) | string; }
readOnly boolean
轉譯器 字串
rendererOverrides { [rendererConstant: string]: any; } | 空值
RTL boolean
setMetrics? (p1: { x?: number; y?: number; }) => void (選用) 如果已設定此屬性,可將工作區的翻譯設定為與捲軸相符。這個函式會將工作區的翻譯設為與捲軸相符。引數會包含 x 和/或 y 屬性,也就是介於 0 和 1 之間的浮點值,用於指定捲動角度。
主題 主題
toolboxPosition toolbox.Position
zoomOptions ZoomOptions