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
When dynamicBullets: true and loop: true are set, and dynamicMainBullets is set to a value greater than 1, the main bullets are not centered and move strangely. This is especially obvious when moving the page in the backwards direction.
I investigated the pagination module, and I found that the index shift caused by swiper.loopedSlides is not considered when calculating the dynamicBulletIndex.
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/swiper-pagination-dynamic-forked-teq17
Bug description
When
dynamicBullets: true
andloop: true
are set, anddynamicMainBullets
is set to a value greater than 1, the main bullets are not centered and move strangely. This is especially obvious when moving the page in the backwards direction.I investigated the pagination module, and I found that the index shift caused by
swiper.loopedSlides
is not considered when calculating thedynamicBulletIndex
.swiper/src/modules/pagination/pagination.js
Line 110 in 5466df6
Expected Behavior
When
loop: false
, the main bullets will always be in the middle, and the same looks would be preferable whenloop: true
.Actual Behavior
In the case of forward pagination, the main bullets will shift to the left at the end of the pagination.
In the case of backward pagination, strange movements like going forward and backward can be seen.
Swiper version
7.3.3
Platform/Target and Browser Versions
macOS 11.6.1, Chrome 96.0.4664.110
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: