Skip to main content

ViewportBounds

Models the current bounds of a viewport, containing its x/y location, width/height and current zoom.

Properties

height

height: number

Height of the content displayed in the viewport


minimumFill

minimumFill: number

The content in each axis fills the viewport at some ratio to the viewport size in that axis. This field provides the smaller of those two ratios. The axis it pertains to is not specified. The inverse of this value gives you the zoom level that would allow all the content to fit in the viewport.


vh

vh: number

The height of the viewport element.


vw

vw: number

The width of the viewport element.


width

width: number

Width of the content displayed in the viewport


x

x: number

Minimum value in X of the content displayed in the viewport


y

y: number

Minimum value in Y of the content displayed in the viewport


zoom

zoom: number

The current zoom level applied in the viewport.