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:
parent
95b12179ab
commit
2e5797a24f
9 changed files with 70 additions and 6 deletions
|
@ -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(){
|
EPUBJS.Book.prototype.unload = function(){
|
||||||
|
|
||||||
if(this.settings.restore && localStorage) {
|
if(this.settings.restore && localStorage) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
4
build/epub.min.js
vendored
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
|
@ -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(){
|
EPUBJS.Book.prototype.unload = function(){
|
||||||
|
|
||||||
if(this.settings.restore && localStorage) {
|
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
16
reader/js/epub.min.js
vendored
|
@ -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(){
|
EPUBJS.Book.prototype.unload = function(){
|
||||||
|
|
||||||
if(this.settings.restore && localStorage) {
|
if(this.settings.restore && localStorage) {
|
||||||
|
|
16
src/book.js
16
src/book.js
|
@ -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(){
|
EPUBJS.Book.prototype.unload = function(){
|
||||||
|
|
||||||
if(this.settings.restore && localStorage) {
|
if(this.settings.restore && localStorage) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue