opal/browser/event/drag.rb in opal-browser-0.3.3 vs opal/browser/event/drag.rb in opal-browser-0.3.4

- old
+ new

@@ -1,5 +1,7 @@ +# backtick_javascript: true + module Browser; class Event class Drag < Event handles 'drag', 'dragend', 'dragenter', 'dragexit', 'dragleave', 'dragover', 'dragstart', 'drop' @@ -10,28 +12,18 @@ class Definition < Definition class Client include Native::Wrapper - def x=(value) - `#@native.clientX = #{value}` - end - - def y=(value) - `#@native.clientY = #{value}` - end + alias_native :x=, :clientX + alias_native :y=, :clientY end class Screen include Native::Wrapper - def x=(value) - `#@native.screenX = #{value}` - end - - def y=(value) - `#@native.screenY = #{value}` - end + alias_native :x=, :screenX + alias_native :y=, :screenY end def alt! `#@native.altKey = true` end