1
0
Fork 0
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:
Fred Chasen 2013-02-01 13:59:56 -08:00
parent f1da229989
commit 4c5235162e
5 changed files with 21 additions and 16 deletions

View file

@ -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);