mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Added windowBounds, enqueue checks after render
This commit is contained in:
parent
b88aab25d9
commit
f998e5be0a
4 changed files with 38 additions and 26 deletions
|
@ -248,18 +248,8 @@ EPUBJS.Continuous.prototype.check = function(){
|
|||
var checking = new RSVP.defer();
|
||||
var container;//this.container.getBoundingClientRect();
|
||||
|
||||
// Temp
|
||||
if(!this.settings.height) {
|
||||
var width = window.innerWidth;
|
||||
var height = window.innerHeight;
|
||||
container = {
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: width,
|
||||
bottom: height,
|
||||
width: width,
|
||||
height: height
|
||||
}
|
||||
container = EPUBJS.core.windowBounds();
|
||||
} else {
|
||||
container = this.container.getBoundingClientRect();
|
||||
}
|
||||
|
@ -277,7 +267,7 @@ EPUBJS.Continuous.prototype.check = function(){
|
|||
.then(function(){
|
||||
|
||||
// Check to see if anything new is on screen after rendering
|
||||
return this.check();
|
||||
this.q.enqueue(this.check);
|
||||
|
||||
}.bind(this));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue