mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Fixed resizing
This commit is contained in:
parent
5c33f9c52b
commit
4670be6f4d
8 changed files with 203 additions and 215 deletions
|
@ -92,6 +92,11 @@ EPUBJS.Paginate.prototype.start = function(){
|
|||
|
||||
this.currentPage = 0;
|
||||
|
||||
window.addEventListener('unload', function(e){
|
||||
this.ignore = true;
|
||||
this.destroy();
|
||||
}.bind(this));
|
||||
|
||||
};
|
||||
|
||||
// EPUBJS.Rendition.prototype.createView = function(section) {
|
||||
|
@ -104,17 +109,13 @@ EPUBJS.Paginate.prototype.start = function(){
|
|||
EPUBJS.Paginate.prototype.layoutMethod = function() {
|
||||
//var task = new RSVP.defer();
|
||||
|
||||
this.spreads = this.determineSpreads(this.settings.minSpreadWidth);
|
||||
// this.spreads = this.determineSpreads(this.settings.minSpreadWidth);
|
||||
|
||||
this.layout = new EPUBJS.Layout.Reflowable(
|
||||
this.stage.width,
|
||||
this.stage.height,
|
||||
this.settings.gap,
|
||||
this.spreads
|
||||
);
|
||||
this.layout = new EPUBJS.Layout.Reflowable();
|
||||
|
||||
this.layoutUpdate();
|
||||
|
||||
// Set the look ahead offset for what is visible
|
||||
this.settings.offset = this.layout.delta;
|
||||
|
||||
this.map = new EPUBJS.Map(this.layout);
|
||||
|
||||
|
@ -125,6 +126,21 @@ EPUBJS.Paginate.prototype.layoutMethod = function() {
|
|||
// return layout;
|
||||
};
|
||||
|
||||
EPUBJS.Paginate.prototype.layoutUpdate = function() {
|
||||
|
||||
this.spreads = this.determineSpreads(this.settings.minSpreadWidth);
|
||||
|
||||
this.layout.calculate(
|
||||
this.stage.width,
|
||||
this.stage.height,
|
||||
this.settings.gap,
|
||||
this.spreads
|
||||
);
|
||||
|
||||
this.settings.offset = this.layout.delta;
|
||||
|
||||
};
|
||||
|
||||
EPUBJS.Paginate.prototype.page = function(pg){
|
||||
|
||||
// this.currentPage = pg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue