You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the go commands should be in the JumpToLocation module, such as go_text and go_id. Snapper's job is only to scroll+snap the content when requested.
This implies that some modules like JumpToLocation might depend on APIs provided by the Snapper. Maybe we can use commands/events for this instead of direct access.
It could flow like this:
The app calls a go_x command in the JumpToLocation module.
The command computes a target DOMRect, then requests the Snapper to snap_to the target rect (with a command event, or direct function call).
The Snapper will resolve the target rect to an actual offset, depending on the technique used for the positioning (CSS translation, native scroll, etc.) and the layout nature (paginated, scrolled, RTL, etc.).
The Snapper will move the viewport to the target offset, with an animation if requested.
Some of the
go
commands should be in theJumpToLocation
module, such asgo_text
andgo_id
.Snapper
's job is only to scroll+snap the content when requested.This implies that some modules like
JumpToLocation
might depend on APIs provided by theSnapper
. Maybe we can use commands/events for this instead of direct access.It could flow like this:
go_x
command in theJumpToLocation
module.DOMRect
, then requests theSnapper
tosnap_to
the target rect (with a command event, or direct function call).Snapper
will resolve the target rect to an actual offset, depending on the technique used for the positioning (CSS translation, native scroll, etc.) and the layout nature (paginated, scrolled, RTL, etc.).Snapper
will move the viewport to the target offset, with an animation if requested.Originally posted by @mickael-menu in #12 (comment)
The text was updated successfully, but these errors were encountered: