DOM.getAspectRatio()

<static> getAspectRatio(object) → {number}

Get the Visual viewport aspect ratio (or the aspect ratio of an object or element)

Parameters
Name Type Argument Default Description
object DOMElement | Object <optional>
(visualViewport)

The object to determine the aspect ratio for. Must have public width and height properties or methods.

Returns
number -

The aspect ratio.

Source code: utils/DOM.js (Line 100)
doc_phaser
2017-02-14 10:44:59
Comments
Leave a Comment

Please login to continue.