You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emitting an event after resize would allow for custom hooks after the slider has been re-initialized. This may require asynchronous methods for the the construction of the slider. I have tried to hook the .next(currentPage) function to return to the same slide after resize as it is a jarring experience for a user to be moved back to slide 1 whenever they resize the page. This could also be solved by allowing the user to specify the starting slide in the config parameters on construction of the slider. An example for the config would be
this.sliderConfig = {
all: {
slidesToShow: 1,
loop: false
startOnSlide: 5
//with this parameter you could pass a function in so the reinit would work as well
get startOnSlide() {
return getCurrentSlide();
},
},
}
The text was updated successfully, but these errors were encountered:
Emitting an event after resize would allow for custom hooks after the slider has been re-initialized. This may require asynchronous methods for the the construction of the slider. I have tried to hook the .next(currentPage) function to return to the same slide after resize as it is a jarring experience for a user to be moved back to slide 1 whenever they resize the page. This could also be solved by allowing the user to specify the starting slide in the config parameters on construction of the slider. An example for the config would be
this.sliderConfig = {
all: {
slidesToShow: 1,
loop: false
startOnSlide: 5
//with this parameter you could pass a function in so the reinit would work as well
get startOnSlide() {
return getCurrentSlide();
},
},
}
The text was updated successfully, but these errors were encountered: