Skip to content

Commit

Permalink
fix(slides): negative number indicates position starting at end (#10997)
Browse files Browse the repository at this point in the history
* fix(slides): negative number indicates position starting at end

* refactor(slides): use var instead of let
  • Loading branch information
rossholdway authored and manucorporat committed Apr 2, 2017
1 parent a055457 commit 33be36d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/slides/swiper/swiper-pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ export function updatePaginationClasses(s: Slides) {

// Types
if (s.paginationType === 'bullets' && s._bullets) {
var selector = current + ( current < 0 ? s._bullets.length : 0 );
for (var i = 0; i < s._bullets.length; i++) {
if (i === current) {
if (i === selector) {
addClass(s._bullets[i], CLS.bulletActive);
} else {
removeClass(s._bullets[i], CLS.bulletActive);
Expand Down

0 comments on commit 33be36d

Please sign in to comment.