Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/swipeview.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,22 @@ var SwipeView = (function (window, document) {
}

this.__flip();

// Hide the next page if we decided to disable looping
if (!this.options.loop) {
//reset all pages visibillity
this.masterPages[0].style.visibility = '';
this.masterPages[1].style.visibility = '';
this.masterPages[2].style.visibility = '';
//if current page firs or last we get number of masterpage an hide it
if (this.page === 0) {
this.masterPages[0].style.visibility = 'hidden';
}
if (this.page == this.options.numberOfPages - 1) {
nextPage = this.currentMasterPage <= 1 ? this.currentMasterPage + 1 : 0;
this.masterPages[nextPage].style.visibility = 'hidden';
}
}
},

next: function () {
Expand Down