1
0
Fork 0
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:
fchasen 2016-03-24 22:45:58 -04:00
parent d9a19e5a28
commit 48216cc7ec
20 changed files with 4683 additions and 2188 deletions

View file

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