选项类
在用户未指定行为时使用合理的默认值解析用户指定的选项。
Signature:
export declare class Options
构造函数
构造函数 | 修饰符 | 说明 |
---|---|---|
(constructor)(options) | 构造 Options 类的新实例 |
属性
媒体资源 | 修饰符 | 类型 | 说明 |
---|---|---|---|
收起 | boolean | ||
评论 | boolean | ||
停用 | boolean | ||
getMetrics? | () => 指标 | (可选)一个函数,用于返回描述当前工作区的指标对象。 | |
gridOptions | GridOptions | ||
gridPattern | SVGElement | null | 网格图案的 SVG 元素。在注入期间创建。 | |
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 | ||
插件 | { [键: 字符串]: (new (...p1: any[]) => any) | string; } | ||
readOnly | boolean | ||
渲染程序 | string | ||
rendererOverrides | { [rendererConstant: string]: any; } | null | ||
RTL | boolean | ||
setMetrics? | (p1: { x?: number; y?: number; }) => void | (可选)如果设置此参数,系统会设置工作区的平移方式,使之与滚动条保持一致。一个函数,用于设置工作区的平移以匹配滚动条。参数包含 x 和/或 y 属性,该属性是介于 0 和 1 之间的浮点数,用于指定滚动程度。 | |
主题背景 | 主题 | ||
toolboxPosition | toolbox.Position | ||
zoomOptions | ZoomOptions |