diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-07-30 17:31:35 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-09-23 09:51:06 +0200 |
commit | 53f04aa1b93d67c62206eb8ee1182ce5f4934123 (patch) | |
tree | b61e5bd9b0f2109f2ca2effc0c4a1aa50b10b497 /misc/dist | |
parent | 806edcae5bf94dced436cd6d27cb94a3a8134e3b (diff) |
Make canvas resize optional in HTML5.
Diffstat (limited to 'misc/dist')
-rw-r--r-- | misc/dist/html/full-size.html | 9 |
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) { |