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, handlers, handles, #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
29
30
31
|
# File 'opal/browser/event/touch.rb', line 29
def self.construct(name, desc)
`new TouchEvent(#{name}, #{desc})`
end
|
.supported? ⇒ Boolean
6
7
8
|
# File 'opal/browser/event/touch.rb', line 6
def self.supported?
Browser.supports? 'Event.Touch'
end
|
Instance Method Details
#cancel? ⇒ Boolean
TODO: implement touches and targetTouches
41
42
43
|
# File 'opal/browser/event/touch.rb', line 41
def cancel?
name.downcase == 'touchcancel'
end
|
#end? ⇒ Boolean
45
46
47
|
# File 'opal/browser/event/touch.rb', line 45
def end?
name.downcase == 'touchend'
end
|
#leave? ⇒ Boolean
49
50
51
|
# File 'opal/browser/event/touch.rb', line 49
def leave?
name.downcase == 'touchleave'
end
|
#move? ⇒ Boolean
53
54
55
|
# File 'opal/browser/event/touch.rb', line 53
def move?
name.downcase == 'touchmove'
end
|
#start? ⇒ Boolean
57
58
59
|
# File 'opal/browser/event/touch.rb', line 57
def start?
name.downcase == 'touchstart'
end
|