Dodanie reinit swiper scrollbar
This commit is contained in:
@@ -32,6 +32,13 @@ class IdmSwiperProgress {
|
||||
this.swiper.on("breakpoint", () => {this.updateBarWidth()});
|
||||
}
|
||||
|
||||
reattachSwiperFn(newSwiperFn){
|
||||
this.swiper = newSwiperFn?.slider?.slider ?? newSwiperFn?.slider ?? newSwiperFn;
|
||||
this.progressEl.style.width = "";
|
||||
this.progressEl.style.left = "";
|
||||
this.updateBarWidth();
|
||||
}
|
||||
|
||||
updateBarWidth() {
|
||||
const { slidesPerGroup, slidesPerView } = this.swiper.params;
|
||||
const totalSlides = this.swiper.slides.length;
|
||||
|
||||
Reference in New Issue
Block a user