Skip to main content
ViewportBounds
Models the current bounds of a viewport, containing its x/y location,
width/height and current zoom.
NameTypeDescription
heightnumberHeight of the content displayed in the viewport
minimumFillnumberThe 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.
vhnumberThe height of the viewport element.
vwnumberThe width of the viewport element.
widthnumberWidth of the content displayed in the viewport
xnumberMinimum value in X of the content displayed in the viewport
ynumberMinimum value in Y of the content displayed in the viewport
zoomnumberThe current zoom level applied in the viewport.