flickity
flickity copied to clipboard
Undocumented scroll event argument positionX
I stumbled onto the second argument passed to the scroll event, positionX
, and am wondering if it's reliable to use it. It's not in the documentation, but it looks like it's been there since v2.0.0.
Can I use this in production and not worry about it being removed in the future?
Here's the line where the scroll event gets returned with 2 arguments: progress, positionX
https://github.com/metafizzy/flickity/blob/e2706840532c0ce9c4fc25832e810ad4f9823b61/js/animate.js#L94
Thanks!
Can I use this in production and not worry about it being removed in the future?
It may not be removed, but I may change how it is calculated. I think I wasn't 100% certain I provided a good measurement. It may not work with wrapAround
.
Is wrapAround
compatibility on the roadmap? 😬 Having issues with different outputs for keyboard navigation and dragging! Progress seems to be inconsistent, too.