MarginPercent Class

Specifies margins to apply around a view volume for methods like lookAtVolume and zoomToElements, expanding the viewed volume by a percentage of its original size to add extra space around one or more edges. The margin values represent a fraction of the view volume's width (for left and right) or height (for top and bottom). The values are clamped to the range 0 through 0.25.

@note Margins are only applied in 2d views, or 3d views in which the camera has been turned off.

@note The way in which the extra space is computed is somewhat unintuitive and may lead to surprising results.

@see - marginPercent.

  • PaddingPercent for a more predictable way of adjusting the viewed volume.

Methods

Name Description
constructor(left: number, top: number, right: number, bottom: number): MarginPercent    

Properties

Name Type Description
bottom number    
left number    
right number    
top number    

Defined in

Last Updated: 17 December, 2024