summaryrefslogtreecommitdiff
path: root/misc/dist
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-07-30 17:31:35 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-09-23 09:51:06 +0200
commit53f04aa1b93d67c62206eb8ee1182ce5f4934123 (patch)
treeb61e5bd9b0f2109f2ca2effc0c4a1aa50b10b497 /misc/dist
parent806edcae5bf94dced436cd6d27cb94a3a8134e3b (diff)
Make canvas resize optional in HTML5.
Diffstat (limited to 'misc/dist')
-rw-r--r--misc/dist/html/full-size.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html
index b293fc9711..58cf8ba4d8 100644
--- a/misc/dist/html/full-size.html
+++ b/misc/dist/html/full-size.html
@@ -147,6 +147,7 @@ $GODOT_HEAD_INCLUDE
const MAIN_PACK = '$GODOT_BASENAME.pck';
const EXTRA_ARGS = JSON.parse('$GODOT_ARGS');
const INDETERMINATE_STATUS_STEP_MS = 100;
+ const FULL_WINDOW = $GODOT_FULL_WINDOW;
var canvas = document.getElementById('canvas');
var statusProgress = document.getElementById('status-progress');
@@ -179,8 +180,12 @@ $GODOT_HEAD_INCLUDE
canvas.style.height = lastHeight + "px";
}
}
- animationCallbacks.push(adjustCanvasDimensions);
- adjustCanvasDimensions();
+ if (FULL_WINDOW) {
+ animationCallbacks.push(adjustCanvasDimensions);
+ adjustCanvasDimensions();
+ } else {
+ engine.setCanvasResizedOnStart(true);
+ }
setStatusMode = function setStatusMode(mode) {