1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Add map for sections and pages, update queue to handle function without promise

This commit is contained in:
Fred Chasen 2015-05-26 19:59:06 -04:00
parent f998e5be0a
commit 5c33f9c52b
14 changed files with 1044 additions and 93 deletions

View file

@ -5,10 +5,12 @@ EPUBJS.Section = function(item){
this.index = item.index;
this.href = item.href;
this.url = item.url;
this.cfiBase = item.cfiBase;
this.next = item.next;
this.prev = item.prev;
this.epubcfi = new EPUBJS.EpubCFI();
this.cfiBase = item.cfiBase;
this.hooks = {};
this.hooks.replacements = new EPUBJS.Hook(this);
@ -118,4 +120,8 @@ EPUBJS.Section.prototype.reconcileLayoutSettings = function(global){
}
});
return settings;
};
EPUBJS.Section.prototype.cfiFromRange = function(_range) {
return this.epubcfi.generateCfiFromRange(_range, this.cfiBase);
};