zoomToElementProps Method
Zoom the view to a show the tightest box around a given set of ElementProps. Optionally, change view rotation.
zoomToElementProps(elementProps: ElementProps[], options?: ViewChangeOptions & MarginOptions & ZoomToOptions): void
note Do not query for ElementProps just to zoom to their placements - Viewport.zoomToElements is much more efficient because it queries only for the placement properties.
Parameter | Type | Description |
---|---|---|
elementProps | ElementProps[] | |
options | ViewChangeOptions & MarginOptions & ZoomToOptions | options that control how the view change works and whether to change view rotation. |
Returns - void
Defined in
- core/frontend/src/Viewport.ts Line 2043
Last Updated: 30 November, 2023