Files
blockly/core/blockly_options.ts
Maribeth Bottorff 037eb59b89 chore: Lint TsDoc. (#6353)
* chore: add linting for tsdoc

* chore: don't require types on return

* chore: remove redundant fileoverview from ts

* chore: change return to returns and add some newlines

* chore: remove license tag

* chore: don't require params/return docs

* chore: remove spurious struct tags

* Revert "chore: change return to returns and add some newlines"

This reverts commit d6d8656a45.

* chore: don't auto-add param names

* chore: disable require-param bc it breaks on this

* return to returns and add line breaks

* chore: configure additional jsdoc rules

* chore: run format

* Revert "chore: remove license tag"

This reverts commit 173455588a.

* chore: allow license tag format

* chore: only require jsdoc on exported items

* chore: add missing jsdoc or silence where needed

* chore: run format

* chore: lint fixes
2022-08-23 14:27:22 -07:00

80 lines
1.7 KiB
TypeScript

/**
* @license
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Object that defines user-specified options for the workspace.
*
* @namespace Blockly.BlocklyOptions
*/
import * as goog from '../closure/goog/goog.js';
goog.declareModuleId('Blockly.BlocklyOptions');
import type {Theme, ITheme} from './theme.js';
import type {WorkspaceSvg} from './workspace_svg.js';
import type {ToolboxDefinition} from './utils/toolbox.js';
/**
* Blockly options.
*
* @alias Blockly.BlocklyOptions
*/
export interface BlocklyOptions {
collapse?: boolean;
comments?: boolean;
css?: boolean;
disable?: boolean;
grid?: GridOptions;
horizontalLayout?: boolean;
maxBlocks?: number;
maxInstances?: {[blockType: string]: number};
media?: string;
move?: MoveOptions;
oneBasedIndex?: boolean;
readOnly?: boolean;
renderer?: string;
rendererOverrides?: {[rendererConstant: string]: any};
rtl?: boolean;
scrollbars?: ScrollbarOptions|boolean;
sounds?: boolean;
theme?: Theme|string|ITheme;
toolbox?: string|ToolboxDefinition|Element;
toolboxPosition?: string;
trashcan?: boolean;
maxTrashcanContents?: number;
plugins?: {[key: string]: (new(...p1: any[]) => any)|string};
zoom?: ZoomOptions;
parentWorkspace?: WorkspaceSvg;
}
export interface GridOptions {
colour?: string;
length?: number;
snap?: boolean;
spacing?: number;
}
export interface MoveOptions {
drag?: boolean;
scrollbars?: boolean|ScrollbarOptions;
wheel?: boolean;
}
export interface ScrollbarOptions {
horizontal?: boolean;
vertical?: boolean;
}
export interface ZoomOptions {
controls?: boolean;
maxScale?: number;
minScale?: number;
pinch?: boolean;
scaleSpeed?: number;
startScale?: number;
wheel?: boolean;
}