mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
added annotator
This commit is contained in:
parent
f70ccc1aa9
commit
f55fb69008
23 changed files with 4397 additions and 25 deletions
|
@ -52,7 +52,13 @@ FP.Chapter.prototype.setIframeSrc = function(url){
|
|||
that.bodyEl = that.doc.body;
|
||||
|
||||
that.formatSpread();
|
||||
|
||||
|
||||
//-- Trigger registered hooks before displaying
|
||||
that.beforeDisplay(function(){
|
||||
that.book.tell("book:chapterDisplayed");
|
||||
that.visible(true);
|
||||
});
|
||||
|
||||
that.afterLoaded(that);
|
||||
|
||||
that.book.listen("book:resized", that.formatSpread, that);
|
||||
|
@ -119,16 +125,12 @@ FP.Chapter.prototype.formatSpread = function(){
|
|||
|
||||
this.calcPages();
|
||||
|
||||
//-- Trigger registered hooks before displaying
|
||||
this.beforeDisplay(function(){
|
||||
this.book.tell("book:chapterDisplayed");
|
||||
this.visible(true);
|
||||
});
|
||||
|
||||
//-- Go to current page after resize
|
||||
if(this.OldcolWidth){
|
||||
this.leftPos = (this.chapterPos - 1 ) * this.spreadWidth;
|
||||
this.bodyEl.scrollLeft = this.leftPos;
|
||||
this.visible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue