mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
New continuos render
This commit is contained in:
parent
0013cf417d
commit
03aef89037
13 changed files with 2027 additions and 120 deletions
|
@ -25,7 +25,15 @@ EPUBJS.Spine.prototype.load = function(_package) {
|
|||
item.href = manifestItem.href;
|
||||
item.url = this.baseUrl + item.href;
|
||||
}
|
||||
|
||||
|
||||
// if(index > 0) {
|
||||
item.prev = function(){ return this.get(index-1); }.bind(this);
|
||||
// }
|
||||
|
||||
// if(index+1 < this.items.length) {
|
||||
item.next = function(){ return this.get(index+1); }.bind(this);
|
||||
// }
|
||||
|
||||
spineItem = new EPUBJS.Section(item);
|
||||
this.append(spineItem);
|
||||
|
||||
|
@ -49,7 +57,7 @@ EPUBJS.Spine.prototype.get = function(target) {
|
|||
index = this.spineByHref[target];
|
||||
}
|
||||
|
||||
return this.spineItems[index];
|
||||
return this.spineItems[index] || null;
|
||||
};
|
||||
|
||||
EPUBJS.Spine.prototype.append = function(section) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue