1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Fixes to examples, and lint errors per pr #230 (by pmstss)

This commit is contained in:
fchasen 2015-06-30 22:50:06 -04:00
parent 2e2d7dfb43
commit d7371a619d
9 changed files with 21 additions and 142 deletions

View file

@ -425,7 +425,7 @@ EPUBJS.Rendition.prototype.next = function(){
if(next) {
view = this.createView(next);
return this.append(view);
return this.fill(view);
}
});
@ -444,7 +444,7 @@ EPUBJS.Rendition.prototype.prev = function(){
prev = this.views.first().section.prev();
if(prev) {
view = this.createView(prev);
return this.append(view);
return this.fill(view);
}
});
@ -480,14 +480,14 @@ EPUBJS.Rendition.prototype.isVisible = function(view, offsetPrev, offsetNext, _c
var container = _container || this.container.getBoundingClientRect();
if(this.settings.axis === "horizontal" &&
(position.right > container.left - offsetPrev) &&
!(position.left >= container.right + offsetNext)) {
position.right > container.left - offsetPrev &&
position.left < container.right + offsetNext) {
return true;
} else if(this.settings.axis === "vertical" &&
(position.bottom > container.top - offsetPrev) &&
!(position.top >= container.bottom + offsetNext)) {
position.bottom > container.top - offsetPrev &&
position.top < container.bottom + offsetNext) {
return true;
}