mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Load fail error, fix scrolled-doc layout
This commit is contained in:
parent
bef15e3af2
commit
0889e63a29
9 changed files with 130 additions and 61 deletions
|
@ -346,14 +346,10 @@ SingleViewManager.prototype.onScroll = function(){
|
|||
|
||||
};
|
||||
|
||||
SingleViewManager.prototype.bounds = function() {
|
||||
SingleViewManager.prototype.bounds = function() {
|
||||
var bounds;
|
||||
|
||||
if(!this.settings.height || !this.container) {
|
||||
bounds = core.windowBounds();
|
||||
} else {
|
||||
bounds = this.stage.bounds();
|
||||
}
|
||||
bounds = this.stage.bounds();
|
||||
|
||||
return bounds;
|
||||
};
|
||||
|
@ -370,13 +366,16 @@ SingleViewManager.prototype.applyLayout = function(layout) {
|
|||
SingleViewManager.prototype.updateLayout = function() {
|
||||
var bounds;
|
||||
|
||||
if (this.stage) {
|
||||
bound = this.stage.bounds();
|
||||
this.layout.calculate(bounds.width, bounds.height);
|
||||
|
||||
this.setLayout(this.layout);
|
||||
if (!this.stage) {
|
||||
return;
|
||||
}
|
||||
|
||||
bounds = this.stage.size();
|
||||
|
||||
this.layout.calculate(bounds.width, bounds.height);
|
||||
|
||||
this.setLayout(this.layout);
|
||||
|
||||
};
|
||||
|
||||
SingleViewManager.prototype.setLayout = function(layout){
|
||||
|
@ -400,6 +399,7 @@ SingleViewManager.prototype.updateFlow = function(flow){
|
|||
|
||||
this.viewSettings.axis = axis;
|
||||
|
||||
this.settings.overflow = (flow === "paginated") ? "hidden" : "auto";
|
||||
// this.views.each(function(view){
|
||||
// view.setAxis(axis);
|
||||
// });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue