mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
small fixes
This commit is contained in:
parent
f1da229989
commit
4c5235162e
5 changed files with 21 additions and 16 deletions
|
@ -468,7 +468,6 @@ FP.Book.prototype.startDisplay = function(chapter){
|
|||
var routed,
|
||||
prevChapter = this.spinePos,
|
||||
loaded = function(chapter){
|
||||
|
||||
//-- If there is a saved page, and the pages haven't changed go to it
|
||||
if( this.prevChapterPos
|
||||
&& prevChapter == chapter.pos
|
||||
|
@ -487,7 +486,7 @@ FP.Book.prototype.startDisplay = function(chapter){
|
|||
|
||||
//-- Go to hashed page if present
|
||||
if(this.useHash){
|
||||
routed = this.route(loaded);
|
||||
routed = this.route(false, loaded);
|
||||
}
|
||||
|
||||
if(!this.useHash || !routed){
|
||||
|
@ -655,7 +654,7 @@ FP.Book.prototype.determineStorageMethod = function(override) {
|
|||
FP.storage.storageMethod(method);
|
||||
}
|
||||
|
||||
FP.Book.prototype.route = function(callback){
|
||||
FP.Book.prototype.route = function(hash, callback){
|
||||
var location = window.location.hash.replace('#/', '');
|
||||
if(this.useHash && location.length && location != this.prevLocation){
|
||||
this.show(location, callback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue