From 8a07db29c0027612dc3eff92a8cca5aa7bffcdee Mon Sep 17 00:00:00 2001 From: Fred Chasen Date: Fri, 24 Aug 2018 11:56:50 -0700 Subject: [PATCH] Update Stage size to allow resizing --- src/managers/helpers/stage.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/managers/helpers/stage.js b/src/managers/helpers/stage.js index 03f8370..fcac04e 100644 --- a/src/managers/helpers/stage.js +++ b/src/managers/helpers/stage.js @@ -162,6 +162,12 @@ class Stage { width = Math.floor(bounds.width); 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) { @@ -169,9 +175,15 @@ class Stage { if(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)) {