mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Update Stage size to allow resizing
This commit is contained in:
parent
c3b074e9cf
commit
8a07db29c0
1 changed files with 13 additions and 1 deletions
|
@ -162,6 +162,12 @@ class Stage {
|
||||||
width = Math.floor(bounds.width);
|
width = Math.floor(bounds.width);
|
||||||
this.container.style.width = width + "px";
|
this.container.style.width = width + "px";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (isNumber(width)) {
|
||||||
|
this.container.style.width = width + "px";
|
||||||
|
} else {
|
||||||
|
this.container.style.width = width;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(height === null) {
|
if(height === null) {
|
||||||
|
@ -169,9 +175,15 @@ class Stage {
|
||||||
|
|
||||||
if(bounds.height) {
|
if(bounds.height) {
|
||||||
height = bounds.height;
|
height = bounds.height;
|
||||||
this.container.style.height = bounds.height + "px";
|
this.container.style.height = height + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (isNumber(height)) {
|
||||||
|
this.container.style.height = height + "px";
|
||||||
|
} else {
|
||||||
|
this.container.style.height = height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isNumber(width)) {
|
if(!isNumber(width)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue