-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carousel: add ability to disable scrolling animation #222
Comments
Feature implemented. Assigning to @jonathanolson to review, since we discussed this briefly today. Rather than adding an |
Looks good, although one question (unlikely to come up in practice): I saw
Presumably the last scrollToItem wouldn't interrupt the tween, so would the tween cause the scroll to end up at item A while the index is at item B? |
Good point. Should probably call |
Done. @jonathanolson anything else? |
Nope, thanks! |
Reopening. There's a bug in this feature, it only works for horizontal carousels. |
Fixed and closing. |
Reopening. To reset a carousel without scrolling, the client has to currently do something like this: var saveAnimationEnabled = myCarousel.animationEnabled;
myCarousel.animationEnabled = false;
myCarousel.reset();
myCarousel.animationEnabled = saveAnimationEnabled; In Function Builder, I have 3 carousels to reset, so this gets quite ugly. What I'd really like to do is tell myCarousel.reset( { animationEnabled: false } ); |
Done, closing. If anyone wants to review, go for it. |
I assigned this commit to the wrong ticket |
In function-builder, I need to programmatically scroll the carousel in order to determine the location of each item in the carousel in the global coordinate frame. Because of the animation that takes place when you call
Carousel.scrollToItem
orscrollToItemIndex
, I was getting the incorrect result. So this is one situation in which disabling animation is useful, and it seems like a generally useful feature.The text was updated successfully, but these errors were encountered: