mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
split rendition into view managers
This commit is contained in:
parent
d9a19e5a28
commit
48216cc7ec
20 changed files with 4683 additions and 2188 deletions
|
@ -3,7 +3,6 @@ var URI = require('urijs');
|
|||
var core = require('./core');
|
||||
var EpubCFI = require('./epubcfi');
|
||||
var Hook = require('./hook');
|
||||
var replacements = require('./replacements');
|
||||
|
||||
function Section(item, hooks){
|
||||
this.idref = item.idref;
|
||||
|
@ -17,12 +16,14 @@ function Section(item, hooks){
|
|||
|
||||
this.cfiBase = item.cfiBase;
|
||||
|
||||
this.hooks = {};
|
||||
this.hooks.serialize = new Hook(this);
|
||||
this.hooks.content = new Hook(this);
|
||||
if (hooks) {
|
||||
this.hooks = hooks;
|
||||
} else {
|
||||
this.hooks = {};
|
||||
this.hooks.serialize = new Hook(this);
|
||||
this.hooks.content = new Hook(this);
|
||||
}
|
||||
|
||||
// Register replacements
|
||||
this.hooks.content.register(replacements.base);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue