Class: ZoomControls
Defined in: packages/blockly/core/zoom_controls.ts:323
Class for a zoom controls.
Implements
Properties index
| Property | Description |
|---|---|
| id | The unique ID for this component that is used to register with the ComponentManager. |
Methods index
| Method | Description |
|---|---|
| createDom | Create the zoom controls. |
| init | Initializes the zoom controls. |
| dispose | Disposes of this zoom controls. Unlink from all DOM elements to prevent memory leaks. |
| getBoundingRectangle | Returns the bounding rectangle of the UI element in pixel units relative to the Blockly injection div. |
| position | Positions the zoom controls. It is positioned in the opposite corner to the corner the categories/toolbox starts at. |
Constructors
Constructor
new ZoomControls(workspace): ZoomControls;
Defined in: packages/blockly/core/zoom_controls.ts:372
Parameters
| Parameter | Type | Description |
|---|---|---|
workspace | WorkspaceSvg | The workspace to sit in. |
Returns
ZoomControls
Properties
id
id: string = 'zoomControls';
Defined in: packages/blockly/core/zoom_controls.ts:328
The unique ID for this component that is used to register with the ComponentManager.
Implementation of
Methods
createDom()
createDom(): SVGElement;
Defined in: packages/blockly/core/zoom_controls.ts:379
Create the zoom controls.
Returns
SVGElement
The zoom controls SVG group.
init()
init(): void;
Defined in: packages/blockly/core/zoom_controls.ts:396
Initializes the zoom controls.
Returns
void
dispose()
dispose(): void;
Defined in: packages/blockly/core/zoom_controls.ts:409
Disposes of this zoom controls. Unlink from all DOM elements to prevent memory leaks.
Returns
void
getBoundingRectangle()
getBoundingRectangle(): Rect | null;
Defined in: packages/blockly/core/zoom_controls.ts:426
Returns the bounding rectangle of the UI element in pixel units relative to the Blockly injection div.
Returns
Rect | null
The UI elements's bounding box. Null if bounding box should be ignored by other UI elements.
Implementation of
IPositionable.getBoundingRectangle
position()
position(metrics, savedPositions): void;
Defined in: packages/blockly/core/zoom_controls.ts:444
Positions the zoom controls. It is positioned in the opposite corner to the corner the categories/toolbox starts at.
Parameters
| Parameter | Type | Description |
|---|---|---|
metrics | UiMetrics | The workspace metrics. |
savedPositions | Rect[] | List of rectangles that are already on the workspace. |
Returns
void