blockly > WorkspaceSvg > getBlocksBoundingBox
WorkspaceSvg.getBlocksBoundingBox() method
Calculate the bounding box for the blocks on the workspace. Coordinate system: workspace coordinates.
Signature:
getBlocksBoundingBox(): Rect;
Returns:
Rect
Contains the position and size of the bounding box containing the blocks on the workspace.
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 `getBlocksBoundingBox()` method calculates the bounding box encompassing all blocks within the workspace."],["It returns a `Rect` object defining the position and dimensions of this bounding box, using workspace coordinates."],["This method is associated with the `WorkspaceSvg` class in Blockly and is useful for operations related to block positioning and visualization within the workspace."]]],[]]