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:
parent
8fb857a574
commit
3fef8b0091
2 changed files with 24 additions and 9 deletions
12
src/book.js
12
src/book.js
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue