flickity icon indicating copy to clipboard operation
flickity copied to clipboard

Undocumented scroll event argument positionX

Open 1deadpixl opened this issue 5 years ago • 2 comments

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!

1deadpixl avatar May 20 '19 02:05 1deadpixl

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.

desandro avatar Jun 06 '19 00:06 desandro

Is wrapAround compatibility on the roadmap? 😬 Having issues with different outputs for keyboard navigation and dragging! Progress seems to be inconsistent, too.

mahnouel avatar Jan 29 '20 10:01 mahnouel