sufone/qawl

Try swipe.js for the page view

mr-islam opened this issue · 1 comments

https://swipe.js.org/

Can use left right buttons easily.

I imagine the implementation to be: A total of 3 pairs of pages: one in the middle that is currently on screen for the user, one on the left that is current +2 / +1, and another pair on the right that is current -1 / -2. These pairs are set dependent on the current page, and changing page by either dragging or "next/prev page" buttons can do a smooth scroll.

Potential issues:

  • Jumping to a specific page (can just set the middle visible pair to instantly change to user selected page, or run a check if it's before or after current page, set the relevant left/right off-screen pair to be that requested page and then do a smooth scroll. This second way brings up way too many issues on how this can interact with other parts of the app…)
  • Would this library even work in a zoomed in view? Where there is already left/right scrolling?

The issues seem large and annoying, so this is low priority. But it's worth experimenting with in some branch.

I really liked flickity as well for the suf.one site