Class: Browser::DOM::Element::Position

Inherits:
Object
  • Object
show all
Defined in:
opal/browser/dom/element/position.rb

Instance Attribute Summary collapse

Instance Attribute Details

#elementObject (readonly)

Returns the value of attribute element.



4
5
6
# File 'opal/browser/dom/element/position.rb', line 4

def element
  @element
end

#xInteger (readonly)

Returns the position of the element on the x axis.

Returns:

  • (Integer)

    the position of the element on the x axis



35
36
37
# File 'opal/browser/dom/element/position.rb', line 35

def x
  get.x
end

#yInteger (readonly)

Returns the position of the element on the y axis.

Returns:

  • (Integer)

    the position of the element on the y axis



41
42
43
# File 'opal/browser/dom/element/position.rb', line 41

def y
  get.y
end