mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
re-built 0.1.8
This commit is contained in:
parent
29d5de9fdc
commit
cd9925b21e
4 changed files with 10 additions and 14 deletions
|
@ -3789,7 +3789,7 @@ EPUBJS.Renderer.prototype.setIframeSrc = function(url){
|
|||
|
||||
});
|
||||
|
||||
renderer.contentWindow.addEventListener("resize", this.resized, false);
|
||||
renderer.contentWindow.addEventListener("resize", renderer.onResized.bind(renderer), false);
|
||||
renderer.addIframeListeners();
|
||||
renderer.addSelectionListeners();
|
||||
};
|
||||
|
@ -4118,7 +4118,7 @@ EPUBJS.Renderer.prototype.replaceLinks = function(callback){
|
|||
|
||||
|
||||
EPUBJS.Renderer.prototype.page = function(pg){
|
||||
if(pg >= 1 && pg <= this.displayedPages && pg != this.chapterPos){
|
||||
if(pg >= 1 && pg <= this.displayedPages){
|
||||
this.chapterPos = pg;
|
||||
this.leftPos = this.spreadWidth * (pg-1); //-- pages start at 1
|
||||
this.setLeft(this.leftPos);
|
||||
|
@ -4126,11 +4126,10 @@ EPUBJS.Renderer.prototype.page = function(pg){
|
|||
this.currentLocationCfi = this.getPageCfi();
|
||||
|
||||
this.book.trigger("renderer:pageChanged", this.currentLocationCfi);
|
||||
|
||||
|
||||
// localStorage.setItem("chapterPos", pg);
|
||||
return true;
|
||||
}
|
||||
|
||||
//-- Return false if page is greater than the total
|
||||
return false;
|
||||
};
|
||||
|
@ -4238,7 +4237,6 @@ EPUBJS.Renderer.prototype.gotoCfiFragment = function(cfi){
|
|||
}
|
||||
|
||||
element = this.epubcfi.getElement(cfi, this.doc);
|
||||
|
||||
this.pageByElement(element);
|
||||
};
|
||||
|
||||
|
@ -4279,7 +4277,7 @@ EPUBJS.Renderer.prototype.height = function(el){
|
|||
};
|
||||
|
||||
EPUBJS.Renderer.prototype.remove = function() {
|
||||
this.contentWindow.removeEventListener("resize", this.resized);
|
||||
this.contentWindow.removeEventListener("resize", this.resize);
|
||||
this.removeIframeListeners();
|
||||
this.removeSelectionListeners();
|
||||
this.el.removeChild(this.iframe);
|
||||
|
|
2
build/epub.min.js
vendored
2
build/epub.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -3788,7 +3788,7 @@ EPUBJS.Renderer.prototype.setIframeSrc = function(url){
|
|||
|
||||
});
|
||||
|
||||
renderer.contentWindow.addEventListener("resize", this.resized, false);
|
||||
renderer.contentWindow.addEventListener("resize", renderer.onResized.bind(renderer), false);
|
||||
renderer.addIframeListeners();
|
||||
renderer.addSelectionListeners();
|
||||
};
|
||||
|
@ -4117,7 +4117,7 @@ EPUBJS.Renderer.prototype.replaceLinks = function(callback){
|
|||
|
||||
|
||||
EPUBJS.Renderer.prototype.page = function(pg){
|
||||
if(pg >= 1 && pg <= this.displayedPages && pg != this.chapterPos){
|
||||
if(pg >= 1 && pg <= this.displayedPages){
|
||||
this.chapterPos = pg;
|
||||
this.leftPos = this.spreadWidth * (pg-1); //-- pages start at 1
|
||||
this.setLeft(this.leftPos);
|
||||
|
@ -4125,11 +4125,10 @@ EPUBJS.Renderer.prototype.page = function(pg){
|
|||
this.currentLocationCfi = this.getPageCfi();
|
||||
|
||||
this.book.trigger("renderer:pageChanged", this.currentLocationCfi);
|
||||
|
||||
|
||||
// localStorage.setItem("chapterPos", pg);
|
||||
return true;
|
||||
}
|
||||
|
||||
//-- Return false if page is greater than the total
|
||||
return false;
|
||||
};
|
||||
|
@ -4237,7 +4236,6 @@ EPUBJS.Renderer.prototype.gotoCfiFragment = function(cfi){
|
|||
}
|
||||
|
||||
element = this.epubcfi.getElement(cfi, this.doc);
|
||||
|
||||
this.pageByElement(element);
|
||||
};
|
||||
|
||||
|
@ -4278,7 +4276,7 @@ EPUBJS.Renderer.prototype.height = function(el){
|
|||
};
|
||||
|
||||
EPUBJS.Renderer.prototype.remove = function() {
|
||||
this.contentWindow.removeEventListener("resize", this.resized);
|
||||
this.contentWindow.removeEventListener("resize", this.resize);
|
||||
this.removeIframeListeners();
|
||||
this.removeSelectionListeners();
|
||||
this.el.removeChild(this.iframe);
|
||||
|
|
2
demo/js/epub.min.js
vendored
2
demo/js/epub.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue