Class: Browser::Event::DeviceMotion::Definition

Inherits:
Browser::Event::Definition show all
Defined in:
opal/browser/event/device_motion.rb

Instance Method Summary collapse

Methods inherited from Browser::Event::Definition

#bubbles=, #cancelable=

Instance Method Details

#acceleration=(value) ⇒ Object


13
14
15
# File 'opal/browser/event/device_motion.rb', line 13

def acceleration=(value)
  `#@native.acceleration = #{value.to_n}`
end

#acceleration_with_gravity=(value) ⇒ Object


17
18
19
# File 'opal/browser/event/device_motion.rb', line 17

def acceleration_with_gravity=(value)
  `#@native.accelerationIncludingGravity = #{value.to_n}`
end

#interval=(value) ⇒ Object


25
26
27
# File 'opal/browser/event/device_motion.rb', line 25

def interval=(value)
  `#@native.interval = #{value}`
end

#rotation=(value) ⇒ Object


21
22
23
# File 'opal/browser/event/device_motion.rb', line 21

def rotation=(value)
  `#@native.rotationRate = #{value}`
end