phucbm / flickity-responsive

💻📱Responsive option for Flickity.
https://flickity.netlify.app
MIT License
7 stars 0 forks source link

Make customArrows option be accessed through all events #22

Closed vuquangpham closed 1 year ago

vuquangpham commented 1 year ago

Problem

Flickity Responsive doesn't hide custom arrows when the slider is not slideable while we already had this function.

Why

In the responsive-navigation function, we only hide the customArrows through options.customArrows, but this option is created in onMatched event and we invoke this function inside onLoad and onResize events. So that we don't have anything change.

image

And a small notice that the object between each event is different in memory. So that the customArrows option that we created in onMatched doesn't exist in onLoad and onResize events.

Solution