Class VisualViewport


  • public class VisualViewport
    extends java.lang.Object
    Visual viewport position, dimensions, and scale
    • Constructor Summary

      Constructors 
      Constructor Description
      VisualViewport()  
    • Method Summary

      Modifier and Type Method Description
      java.lang.Double getClientHeight()
      Height (CSS pixels), excludes scrollbar if present.
      java.lang.Double getClientWidth()
      Width (CSS pixels), excludes scrollbar if present.
      java.lang.Double getOffsetX()
      Horizontal offset relative to the layout viewport (CSS pixels).
      java.lang.Double getOffsetY()
      Vertical offset relative to the layout viewport (CSS pixels).
      java.lang.Double getPageX()
      Horizontal offset relative to the document (CSS pixels).
      java.lang.Double getPageY()
      Vertical offset relative to the document (CSS pixels).
      java.lang.Double getScale()
      Scale relative to the ideal viewport (size at width=device-width).
      java.lang.Double getZoom()
      Page zoom factor (CSS to device independent pixels ratio).
      void setClientHeight​(java.lang.Double clientHeight)
      Height (CSS pixels), excludes scrollbar if present.
      void setClientWidth​(java.lang.Double clientWidth)
      Width (CSS pixels), excludes scrollbar if present.
      void setOffsetX​(java.lang.Double offsetX)
      Horizontal offset relative to the layout viewport (CSS pixels).
      void setOffsetY​(java.lang.Double offsetY)
      Vertical offset relative to the layout viewport (CSS pixels).
      void setPageX​(java.lang.Double pageX)
      Horizontal offset relative to the document (CSS pixels).
      void setPageY​(java.lang.Double pageY)
      Vertical offset relative to the document (CSS pixels).
      void setScale​(java.lang.Double scale)
      Scale relative to the ideal viewport (size at width=device-width).
      void setZoom​(java.lang.Double zoom)
      Page zoom factor (CSS to device independent pixels ratio).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VisualViewport

        public VisualViewport()
    • Method Detail

      • getOffsetX

        public java.lang.Double getOffsetX()
        Horizontal offset relative to the layout viewport (CSS pixels).
      • setOffsetX

        public void setOffsetX​(java.lang.Double offsetX)
        Horizontal offset relative to the layout viewport (CSS pixels).
      • getOffsetY

        public java.lang.Double getOffsetY()
        Vertical offset relative to the layout viewport (CSS pixels).
      • setOffsetY

        public void setOffsetY​(java.lang.Double offsetY)
        Vertical offset relative to the layout viewport (CSS pixels).
      • getPageX

        public java.lang.Double getPageX()
        Horizontal offset relative to the document (CSS pixels).
      • setPageX

        public void setPageX​(java.lang.Double pageX)
        Horizontal offset relative to the document (CSS pixels).
      • getPageY

        public java.lang.Double getPageY()
        Vertical offset relative to the document (CSS pixels).
      • setPageY

        public void setPageY​(java.lang.Double pageY)
        Vertical offset relative to the document (CSS pixels).
      • getClientWidth

        public java.lang.Double getClientWidth()
        Width (CSS pixels), excludes scrollbar if present.
      • setClientWidth

        public void setClientWidth​(java.lang.Double clientWidth)
        Width (CSS pixels), excludes scrollbar if present.
      • getClientHeight

        public java.lang.Double getClientHeight()
        Height (CSS pixels), excludes scrollbar if present.
      • setClientHeight

        public void setClientHeight​(java.lang.Double clientHeight)
        Height (CSS pixels), excludes scrollbar if present.
      • getScale

        public java.lang.Double getScale()
        Scale relative to the ideal viewport (size at width=device-width).
      • setScale

        public void setScale​(java.lang.Double scale)
        Scale relative to the ideal viewport (size at width=device-width).
      • getZoom

        public java.lang.Double getZoom()
        Page zoom factor (CSS to device independent pixels ratio).
      • setZoom

        public void setZoom​(java.lang.Double zoom)
        Page zoom factor (CSS to device independent pixels ratio).