mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
invalidate stored page position if chapter is different
This commit is contained in:
parent
66515b2e9c
commit
053ddb23a5
2 changed files with 6 additions and 2 deletions
|
@ -466,10 +466,13 @@ FP.Book.prototype.chapterTitle = function(){
|
|||
|
||||
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 && this.prevDisplayedPages == chapter.displayedPages){
|
||||
if( this.prevChapterPos
|
||||
&& prevChapter == chapter.pos
|
||||
&& this.prevDisplayedPages == chapter.displayedPages) {
|
||||
chapter.page(this.prevChapterPos);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue