blockly > IPositionable
IPositionable interface
Interface for a component that is positioned on top of the workspace.
Signature:
export interface IPositionable extends IComponent
Extends: IComponent
Methods
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `IPositionable` interface in Blockly defines components positioned on the workspace, extending the `IComponent` interface."],["It provides methods to get the bounding rectangle of the element and to position it, particularly during window resizing."]]],["The `IPositionable` interface defines components positioned on top of a workspace. It extends the `IComponent` interface. Key actions include retrieving the UI element's bounding rectangle via `getBoundingRectangle()`, which returns pixel units relative to the injection div. The `position()` method is used to reposition the element, typically when the window size changes. These methods ensure the component's location and dimensions are accurately tracked and managed within the workspace.\n"]]