Interface: IPositionable
Defined in: packages/blockly/core/interfaces/i_positionable.ts:16
Interface for a component that is positioned on top of the workspace.
Extends
Properties index
| Property | Description |
|---|---|
| id | The unique ID for this component that is used to register with the ComponentManager. |
Methods index
| Method | Description |
|---|---|
| position | Positions the element. Called when the window is resized. |
| getBoundingRectangle | Returns the bounding rectangle of the UI element in pixel units relative to the Blockly injection div. |
Properties
id
id: string;
Defined in: packages/blockly/core/interfaces/i_component.ts:18
The unique ID for this component that is used to register with the ComponentManager.
Inherited from
Methods
position()
position(metrics, savedPositions): void;
Defined in: packages/blockly/core/interfaces/i_positionable.ts:23
Positions the element. Called when the window is resized.
Parameters
| Parameter | Type | Description |
|---|---|---|
metrics | UiMetrics | The workspace metrics. |
savedPositions | Rect[] | List of rectangles that are already on the workspace. |
Returns
void
getBoundingRectangle()
getBoundingRectangle(): Rect | null;
Defined in: packages/blockly/core/interfaces/i_positionable.ts:32
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.