Applying Scale to Active Slide Causes Scrolling Offset #684
-
Hello all. I'm building a center focused coverflow slider and having an issue. If you target the My assumption here is that on each click of the next button we are calculating the distance from the left edge of one slide to the left edge of the next and that that distance is used to figure out how far the slide should move. I think a solution here (assuming I'm correct about the cause) would be to have the javascript responsible "back out" and transform styles on the slide before calculating that new distance. I'm looking through the repo now to see how the slide positions are determined but not having much luck finding it. So wondering can anyone point me to the place in the code where this move distance is figured. I'd be happy to open a PR that adds accounting for transforms either by default or as an option. I just don't have time at the moment to pick through and find how it all works. OR In the case I'm missing something obvious can someone point me to properties, or an event, that would allow us to scale slides without causing problems. As another problem I run into is that the scaled slide overflows the track and is cut off. Thanks all! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can do this:
The result will be the slider on the top of my site (https://splidejs.com/). |
Beta Was this translation helpful? Give feedback.
You can do this:
div
inside each slide, and scale it instead of a slide element itselfThe result will be the slider on the top of my site (https://splidejs.com/).