clearbold / artx

1 stars 0 forks source link

Bottom carousel—with only one or two events, disable swipe #29

Closed jamiefolsom closed 9 years ago

heymarkreeves commented 9 years ago

See also #35

bxSlider (detailed in #35) does not support an option to disable swipe based on only 1 or 2 slides, which does look a bit odd.

One possibility here is to set infiniteLoop: false in bxSlider's options, which may prove necessary if lazy loading were to be implemented in the future. This would effectively keep the same slide from being swiped repeatedly, but would also affect a scenario with 20 slides: You'd need to swipe back through all 20 to get to the first. We'd also need to implement a disabled state for prev/next buttons at start/end.

(Also a consideration: All sliders are handled by the same scripting, including Related Events, etc.)

Conclusion: This is something we can do, but need to acknowledge that it would remove infinite loop in all cases.

desigonz commented 9 years ago

Liam and I both lean toward disabling infinite loop for the bottom nav. Does this remove infinite loop in the case of the recommended events on the home/discover page?

heymarkreeves commented 9 years ago

Thanks, @desigonz! @SherriAlexander: If we set infiteLoop: false on the bottom carousels, it will affect all footer carousels, but will it affect the large Discover carousel?

SherriAlexander commented 9 years ago

Hey there! The settings for the Discover slider at the top are kept separate from the settings for the footer carousel at the bottom, so we can alter one without affecting the other.

SherriAlexander commented 9 years ago

Hey there! This is all set now -- we've disabled the infinite loop behavior, so the footer carousel will no longer allow you to swipe if there are no real items to swipe to. Thanks!