class UnderOs::UI::Events::TouchListeners::Touch

Attributes

position[R]
view[R]

Public Class Methods

new(view, position) click to toggle source
# File lib/under_os/ui/utils/events.rb, line 85
def initialize(view, position)
  @view     = view
  @position = position
end

Public Instance Methods

inspect() click to toggle source
# File lib/under_os/ui/utils/events.rb, line 106
def inspect
  "#<Touch x=#{pageX} y=#{pageY}"
end
pageX() click to toggle source
# File lib/under_os/ui/utils/events.rb, line 90
def pageX
  position.x
end
pageY() click to toggle source
# File lib/under_os/ui/utils/events.rb, line 94
def pageY
  position.y
end
viewX() click to toggle source
# File lib/under_os/ui/utils/events.rb, line 98
def viewX
  @position.x - view._.frame.origin.x
end
viewY() click to toggle source
# File lib/under_os/ui/utils/events.rb, line 102
def viewY
  @position.y - view._.frame.origin.y
end