mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
added book.setStyle
This commit is contained in:
parent
0c7942e0f2
commit
8fb857a574
5 changed files with 51 additions and 9 deletions
11
src/book.js
11
src/book.js
|
|
@ -583,6 +583,17 @@ EPUBJS.Book.prototype.fromStorage = function(stored) {
|
|||
}
|
||||
*/
|
||||
|
||||
EPUBJS.Book.prototype.setStyle = function(style, val, prefixed) {
|
||||
this.renderer.style(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]);
|
||||
}
|
||||
}
|
||||
|
||||
//-- Get pre-registered hooks
|
||||
EPUBJS.Book.prototype.getHooks = function(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue