public class VisualViewport extends Object
| Constructor and Description |
|---|
VisualViewport() |
| Modifier and Type | Method and Description |
|---|---|
Double |
getClientHeight()
Height (CSS pixels), excludes scrollbar if present.
|
Double |
getClientWidth()
Width (CSS pixels), excludes scrollbar if present.
|
Double |
getOffsetX()
Horizontal offset relative to the layout viewport (CSS pixels).
|
Double |
getOffsetY()
Vertical offset relative to the layout viewport (CSS pixels).
|
Double |
getPageX()
Horizontal offset relative to the document (CSS pixels).
|
Double |
getPageY()
Vertical offset relative to the document (CSS pixels).
|
Double |
getScale()
Scale relative to the ideal viewport (size at width=device-width).
|
Double |
getZoom()
Page zoom factor (CSS to device independent pixels ratio).
|
void |
setClientHeight(Double clientHeight)
Height (CSS pixels), excludes scrollbar if present.
|
void |
setClientWidth(Double clientWidth)
Width (CSS pixels), excludes scrollbar if present.
|
void |
setOffsetX(Double offsetX)
Horizontal offset relative to the layout viewport (CSS pixels).
|
void |
setOffsetY(Double offsetY)
Vertical offset relative to the layout viewport (CSS pixels).
|
void |
setPageX(Double pageX)
Horizontal offset relative to the document (CSS pixels).
|
void |
setPageY(Double pageY)
Vertical offset relative to the document (CSS pixels).
|
void |
setScale(Double scale)
Scale relative to the ideal viewport (size at width=device-width).
|
void |
setZoom(Double zoom)
Page zoom factor (CSS to device independent pixels ratio).
|
public Double getOffsetX()
public void setOffsetX(Double offsetX)
public Double getOffsetY()
public void setOffsetY(Double offsetY)
public Double getPageX()
public void setPageX(Double pageX)
public Double getPageY()
public void setPageY(Double pageY)
public Double getClientWidth()
public void setClientWidth(Double clientWidth)
public Double getClientHeight()
public void setClientHeight(Double clientHeight)
public Double getScale()
public void setScale(Double scale)
public Double getZoom()
public void setZoom(Double zoom)
Copyright © 2020. All rights reserved.