Module: Plushie::Command::Scroll
- Defined in:
- lib/plushie/command/scroll.rb
Overview
Scroll commands: absolute, relative, and snap positioning.
All functions support window-qualified paths ("window#widget").
Class Method Summary collapse
-
.scroll_by(widget_id, x, y) ⇒ Cmd
Scroll by a relative delta.
-
.scroll_to(widget_id, x, y) ⇒ Cmd
Scroll to an absolute offset.
-
.snap_to(widget_id, x, y) ⇒ Cmd
Snap to a relative position (0.0 to 1.0).
-
.snap_to_end(widget_id) ⇒ Cmd
Snap to the end of scrollable content.
Class Method Details
.scroll_by(widget_id, x, y) ⇒ Cmd
Scroll by a relative delta.
46 47 48 |
# File 'lib/plushie/command/scroll.rb', line 46 def scroll_by(, x, y) Command.(, "scroll_by", {x: x, y: y}) end |
.scroll_to(widget_id, x, y) ⇒ Cmd
Scroll to an absolute offset.
21 22 23 |
# File 'lib/plushie/command/scroll.rb', line 21 def scroll_to(, x, y) Command.(, "scroll_to", {x: x, y: y}) end |