Class: Browser::Event::Touch
Defined Under Namespace
Classes: Definition
Instance Attribute Summary
#callback, #on
Class Method Summary
collapse
Instance Method Summary
collapse
aliases, #arguments, #arguments=, class_for, create, #initialize, #name, name_for, new, #off, #prevent, #prevented?, #stop, #stop!, #stopped?, #target
Constructor Details
This class inherits a constructor from Browser::Event
Class Method Details
.construct(name, desc) ⇒ Object
27
28
29
|
# File 'opal/browser/event/touch.rb', line 27
def self.construct(name, desc)
`new TouchEvent(#{name}, #{desc})`
end
|
.supported? ⇒ Boolean
4
5
6
|
# File 'opal/browser/event/touch.rb', line 4
def self.supported?
Browser.supports? 'Event.Touch'
end
|
Instance Method Details
#cancel? ⇒ Boolean
TODO: implement touches and targetTouches
39
40
41
|
# File 'opal/browser/event/touch.rb', line 39
def cancel?
name.downcase == 'touchcancel'
end
|
#end? ⇒ Boolean
43
44
45
|
# File 'opal/browser/event/touch.rb', line 43
def end?
name.downcase == 'touchend'
end
|
#leave? ⇒ Boolean
47
48
49
|
# File 'opal/browser/event/touch.rb', line 47
def leave?
name.downcase == 'touchleave'
end
|
#move? ⇒ Boolean
51
52
53
|
# File 'opal/browser/event/touch.rb', line 51
def move?
name.downcase == 'touchmove'
end
|
#start? ⇒ Boolean
55
56
57
|
# File 'opal/browser/event/touch.rb', line 55
def start?
name.downcase == 'touchstart'
end
|