1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

setters for gap and spreadwidth

This commit is contained in:
fchasen 2014-04-30 16:14:35 -07:00
parent 95b12179ab
commit 2e5797a24f
9 changed files with 70 additions and 6 deletions

View file

@ -3344,6 +3344,22 @@ EPUBJS.Book.prototype.forceSingle = function(use) {
}
};
EPUBJS.Book.prototype.setSpreadWidth = function(width) {
this.settings.minSpreadWidth = width;
if(this.isRendered) {
this.renderer.setMinSpreadWidth(this.settings.minSpreadWidth);
this.renderer.reformat();
}
};
EPUBJS.Book.prototype.setGap = function(gap) {
this.settings.gap = gap;
if(this.isRendered) {
this.renderer.setGap(this.settings.gap);
this.renderer.reformat();
}
};
EPUBJS.Book.prototype.unload = function(){
if(this.settings.restore && localStorage) {