Class: Ruflet::Events::LongPressMoveUpdateEvent
- Inherits:
-
BasePayload
- Object
- BasePayload
- Ruflet::Events::LongPressMoveUpdateEvent
- Defined in:
- lib/ruflet_ui/ruflet/events/gesture_events.rb
Instance Attribute Summary collapse
-
#global_position ⇒ Object
readonly
Returns the value of attribute global_position.
-
#local_offset_from_origin ⇒ Object
readonly
Returns the value of attribute local_offset_from_origin.
-
#local_position ⇒ Object
readonly
Returns the value of attribute local_position.
-
#offset_from_origin ⇒ Object
readonly
Returns the value of attribute offset_from_origin.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(local_position:, global_position:, offset_from_origin:, local_offset_from_origin:) ⇒ LongPressMoveUpdateEvent
constructor
A new instance of LongPressMoveUpdateEvent.
Methods inherited from BasePayload
duration, offset, pick, stringify_keys
Constructor Details
#initialize(local_position:, global_position:, offset_from_origin:, local_offset_from_origin:) ⇒ LongPressMoveUpdateEvent
Returns a new instance of LongPressMoveUpdateEvent.
164 165 166 167 168 169 |
# File 'lib/ruflet_ui/ruflet/events/gesture_events.rb', line 164 def initialize(local_position:, global_position:, offset_from_origin:, local_offset_from_origin:) @local_position = local_position @global_position = global_position @offset_from_origin = offset_from_origin @local_offset_from_origin = local_offset_from_origin end |
Instance Attribute Details
#global_position ⇒ Object (readonly)
Returns the value of attribute global_position.
162 163 164 |
# File 'lib/ruflet_ui/ruflet/events/gesture_events.rb', line 162 def global_position @global_position end |
#local_offset_from_origin ⇒ Object (readonly)
Returns the value of attribute local_offset_from_origin.
162 163 164 |
# File 'lib/ruflet_ui/ruflet/events/gesture_events.rb', line 162 def local_offset_from_origin @local_offset_from_origin end |
#local_position ⇒ Object (readonly)
Returns the value of attribute local_position.
162 163 164 |
# File 'lib/ruflet_ui/ruflet/events/gesture_events.rb', line 162 def local_position @local_position end |
#offset_from_origin ⇒ Object (readonly)
Returns the value of attribute offset_from_origin.
162 163 164 |
# File 'lib/ruflet_ui/ruflet/events/gesture_events.rb', line 162 def offset_from_origin @offset_from_origin end |
Class Method Details
.from_data(data) ⇒ Object
171 172 173 174 175 176 177 178 |
# File 'lib/ruflet_ui/ruflet/events/gesture_events.rb', line 171 def self.from_data(data) new( local_position: offset(data, "l", "local_position"), global_position: offset(data, "g", "global_position"), offset_from_origin: offset(data, "of", "offset_from_origin"), local_offset_from_origin: offset(data, "lofo", "local_offset_from_origin") ) end |