فهرست منبع

[HTML5] Properly set canvas size during setup.

It used to be updated before the first iteration, causing the
window/viewport size values to be incorrect during the initialization
phase (e.g. during the first `_ready` notification).
Fabio Alessandrelli 4 سال پیش
والد
کامیت
3f059b90d6
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      platform/javascript/js/libs/library_godot_display.js

+ 1 - 0
platform/javascript/js/libs/library_godot_display.js

@@ -805,6 +805,7 @@ const GodotDisplay = {
 			canvas.style.left = 0;
 			canvas.style.left = 0;
 			break;
 			break;
 		}
 		}
+		GodotDisplayScreen.updateSize();
 		if (p_fullscreen) {
 		if (p_fullscreen) {
 			GodotDisplayScreen.requestFullscreen();
 			GodotDisplayScreen.requestFullscreen();
 		}
 		}