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

apply styles after chapter load and added remove method

This commit is contained in:
Fred Chasen 2013-06-30 23:29:17 -07:00
parent 8fb857a574
commit 3fef8b0091
2 changed files with 24 additions and 9 deletions

View file

@ -584,17 +584,19 @@ EPUBJS.Book.prototype.fromStorage = function(stored) {
*/
EPUBJS.Book.prototype.setStyle = function(style, val, prefixed) {
this.renderer.style(style, val, prefixed);
this.renderer.setStyle(style, val, prefixed);
this.settings.styles[style] = val;
}
EPUBJS.Book.prototype.applyStyles = function() {
for (style in this.settings.styles) {
this.setStyle(style, this.settings.styles[style]);
}
EPUBJS.Book.prototype.removeStyle = function(style, val, prefixed) {
this.renderer.removeStyle(style);
delete this.settings.styles[style] = '';
}
removeStyle
//-- Get pre-registered hooks
EPUBJS.Book.prototype.getHooks = function(){
var book = this,