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
Describe the solution you'd like (discussed in #579)
Originally posted by davidjerleke September 25, 2023 @tobimori we could replace the number option with a callback function like so:
constoptions={align: (viewSize,snapSize,index)=>{// create your own alignmentreturnyourCustomAlignment}}
The benefit of this would be that you would have direct access to the size of the container (viewSize) and the current slide/slideGroup (itemSize) which is convenient because you don't have to read element dimensions yourself. Note that the function would run for each and every scroll snap. This would be even more flexible than the previous implementation and wouldn't affect bundle size.
The text was updated successfully, but these errors were encountered:
Feature request is related to
Describe the solution you'd like (discussed in #579)
Originally posted by davidjerleke September 25, 2023
@tobimori we could replace the number option with a callback function like so:
The benefit of this would be that you would have direct access to the size of the container (viewSize) and the current slide/slideGroup (itemSize) which is convenient because you don't have to read element dimensions yourself. Note that the function would run for each and every scroll snap. This would be even more flexible than the previous implementation and wouldn't affect bundle size.
The text was updated successfully, but these errors were encountered: