DOM.getOffset()

<static> getOffset(element, point) → {Phaser.Point}

Get the [absolute] position of the element relative to the Document.

The value may vary slightly as the page is scrolled due to rounding errors.

Parameters
Name Type Argument Description
element DOMElement

The targeted element that we want to retrieve the offset.

point Phaser.Point <optional>

The point we want to take the x/y values of the offset.

Returns
  • A point objet with the offsetX and Y as its properties.
Source code: utils/DOM.js (Line 20)
doc_phaser
2017-02-14 10:45:00
Comments
Leave a Comment

Please login to continue.