davidjerleke / embla-carousel

A lightweight carousel library with fluid motion and great swipe precision.
https://www.embla-carousel.com
MIT License
5.42k stars 164 forks source link

Option to Disable Rubber Band Effect when Loop is set to False #517

Closed jakedowns closed 1 year ago

jakedowns commented 1 year ago

Feature request is related to

Is your feature request related to an issue?

https://github.com/davidjerleke/embla-carousel/issues/42

Describe the solution you'd like

i'd like an option or workaround to disable rubber-banding on the first / last item when loop is False i use embla nested within ANOTHER swiper element, and when the user swipes right on the first image, i'd like the outer container to pick up the pan gesture, and animate the outer container

currently: i see the inner slideshow moving AND the outer container moving simultaneously, which just isn't what my client desires.

Describe alternatives you've considered

  1. disabling 1:1 swipe-based page naviation effect in favor of an Arrow overlay element coming into view

    still has issue of nested gesture recognition (bad visual affordance to user that there's more media to view, rather than that they've reached a hard Stop edge and will begin controlling the OUTER container)

  2. disable visual feedback and just respond to swipe (bad ux)

  3. disable swipe gesture stick to alternative arrow button navigation (would love to keep swiper like "native app" feeling)

Additional context

you can see the nested swiper effect / issue if you visit this page on mobile: https://www.wright20.com/auctions/2023/07/2021-art/100

davidjerleke commented 1 year ago

Hi @jakedowns,

Did you try this solution? I also think you missed this information.

Best, David

jakedowns commented 1 year ago

oh derp, i had copied a version that still used dangerouslyGetEngine

i see internalEngine() was the updated way to reference it

works great!

thanks for such a great plugin, and i appreciate your attention to detail!

davidjerleke commented 1 year ago

Duplicate of: