Class: Browser::Event::Drag
Overview
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
68
69
70
|
# File 'opal/browser/event/drag.rb', line 68
def self.construct(name, desc)
`new DragEvent(#{name}, #{desc})`
end
|
.supported? ⇒ Boolean
5
6
7
|
# File 'opal/browser/event/drag.rb', line 5
def self.supported?
Browser.supports? 'Event.Drag'
end
|
Instance Method Details
93
94
95
|
# File 'opal/browser/event/drag.rb', line 93
def client
Position.new(`#@native.clientX`, `#@native.clientY`)
end
|
109
110
111
|
# File 'opal/browser/event/drag.rb', line 109
def related
DOM(`#@native.relatedTarget`)
end
|
97
98
99
|
# File 'opal/browser/event/drag.rb', line 97
def screen
Position.new(`#@native.screenX`, `#@native.screenY`) if defined?(`#@native.screenX`)
end
|
114
115
116
|
# File 'opal/browser/event/drag.rb', line 114
def transfer
raise NotImplementedError
end
|
101
102
103
|
# File 'opal/browser/event/drag.rb', line 101
def x
screen.x
end
|
105
106
107
|
# File 'opal/browser/event/drag.rb', line 105
def y
screen.y
end
|