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
In order to prepare for the implementation of the timeline in #29 as well as the wrap-jump wrapping method in #53, some method for jumping to the desired page in the carousel should be created. Doing this before the issues mentioned above means that the process will be more streamlined.
The text was updated successfully, but these errors were encountered:
Should take some time to decide how 'pages' will work in a carousel. Take the following for example, and consider a scrollBy value of 3 and a wrapping method of either none or wrap-smart:
The best workaround for this situation is to simply do the following:
Determine that there are 4 total pages, since 10 / 3 = 3.333 ~ 4.
The user will start at page 1.
When the user clicks on a page from their page, the currentScrollBy is set to scrollBy * ( |newPage - currentPage| ). So in this example, clicking on page 4 from 2 tries scrolling by 6. This should just stop right at the end.
This means that carousels with scrollBy values that do not go evenly into the total number of items will have different versions of pages, but there is no real way to avoid this.
Carousels that use wrap-simple will likely have even more combinations of pages due to the fact that they can roll over infinitely. Essentially, pages will just be quick ways of navigating X number of scrollBy distances.
In order to prepare for the implementation of the timeline in #29 as well as the wrap-jump wrapping method in #53, some method for jumping to the desired page in the carousel should be created. Doing this before the issues mentioned above means that the process will be more streamlined.
The text was updated successfully, but these errors were encountered: