Skip to content

Commit

Permalink
When the slide container does not have page indicators, changed events
Browse files Browse the repository at this point in the history
do not fire while swiping through the slides.

This is because this._footer is referenced by setActivePageIndicator,
which is undefined in the case where we have no page indicators.

Fix is to only call setActivePageIndicator when we have page indicators
enabled.
  • Loading branch information
Andrew Lo committed Jun 23, 2016
1 parent 754bbd5 commit 9a324f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nativescript-slides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ export class SlideContainer extends AbsoluteLayout {
if (this.disablePan === false) {
this.applySwipe(this.pageWidth);
}
this.setActivePageIndicator(this.currentPanel.index);
if (this.pageIndicators) {
this.setActivePageIndicator(this.currentPanel.index);
}
this.rebindSlideShow();
}

Expand Down

0 comments on commit 9a324f4

Please sign in to comment.