-
Notifications
You must be signed in to change notification settings - Fork 606
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
select cell without animation #128
Comments
Ah! Good feature request. Sounds like you want a Flickity.prototype.selectInstantly = function( index ) {
if ( !this.cells[ index ] ) {
return;
}
this.selectedIndex = index;
this.setSelectedCell();
// instantly go to cell
this.x = -this.selectedCell.target;
this.positionSlider();
this.dispatchEvent('cellSelect');
}; See http://codepen.io/desandro/pen/aOvoPv +1 this issue if you would like to see this method added to Flickity. |
Thanks so much. I've been going through the source of Flickity it's a good learning experience 👍 My project is OSS but I'll buy a license tomorrow to support your work. |
Thanks @desandro! this is perfect. |
+1 |
Hey there @desandro. I ran into a snag with your selectInstantly method. I'm currently creating an overlay and adding elements to Flickity dynamically with flkty.insert. When I close the overlay I do flkty.remove on the items in the slider (clearing them all out). When I open the overlay I re-populate the slider with new tiles via flkty.insert. The problem is is once I re-populate the slider the the selectInstantly method no longer works (reverts to old animated select). Any ideas on how to get this to work? |
@iammattq Sorry to hear the trouble. Can you provide a reduced test case? |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
In Flickity v1.1.2, Thanks so much for all the feedback! 🌈 🐻 |
In version > 2.0.0 the Flickity object is missing the TypeError: this.setSelectedCell is not a function. (In 'this.setSelectedCell()', 'this.setSelectedCell' is undefined) |
@raphaelokon Use the $carousel.flickity( 'select', 2, false, true ) |
Worth noting that the vanilla API looks like: flkty.select( index, isWrapped, isInstant ) |
Is it possible to autoplay instantly so it simulates a GIF effect? I've been trying having |
+1 |
1 similar comment
+1 |
Q: Is there a way to prevent the excessive animation at the beginning when scrolling to a slide?
See video: http://cl.ly/0k3T3n2m1x30/kanamaster.mp4
I could hide while animating but that would just make the app feel slower.
Loving Flickity, great work @desandro .
The text was updated successfully, but these errors were encountered: