1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +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

@ -3345,6 +3345,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) {

File diff suppressed because one or more lines are too long

4
build/epub.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

16
reader/js/epub.min.js vendored
View file

@ -3345,6 +3345,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) {

View file

@ -1095,6 +1095,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) {