xiel / embla-carousel-wheel-gestures

wheel interactions for Embla Carousel
https://embla-carousel-wheel-gestures.xiel.dev/react.html
MIT License
54 stars 8 forks source link

Target option #165

Closed vitaly-phntm closed 2 years ago

vitaly-phntm commented 2 years ago

Would be great if you can pass target option. Use case if there is one carousel on the non scrollable page and I want it to scroll on document.documentElement instead of carousel element

xiel commented 2 years ago

Yes, we can consider this an option. But I wonder, could you not achieve the same by making the carousel larger/cover the whole screen, and inset the content using padding/max-heights if needed?

vitaly-phntm commented 2 years ago

There are other interactive elements on the page and carousel sandwiched in between them with flexbox, making it fixed in the layout will make it a lot harder to build the layout with some additional js involved in scaling. Would be a lot easier to just add a target option (which is what I'm doing atm). Would be nicer if I didn't have to modify the code of the library :)

xiel commented 2 years ago

Thanks for the explanation, sounds reasonable, I'll have a look at it.

xiel commented 2 years ago

The target option was released with 📦 v2.2.0

Thanks for idea and opening the issue.