MikaFil commited on
Commit
2a83384
Β·
verified Β·
1 Parent(s): a969b58

Update fullscreen_playcanvas.js

Browse files
Files changed (1) hide show
  1. fullscreen_playcanvas.js +16 -16
fullscreen_playcanvas.js CHANGED
@@ -301,23 +301,23 @@
301
  });
302
 
303
  // ─── 16. Resize / orientation ────────────────────────────────────────────────
304
- window.addEventListener('resize', function () {
305
- if (isFullscreen) {
 
 
 
 
 
 
 
 
 
 
 
306
  wrapper.style.width = '100vw';
307
- // Utilise dvh si disponible, sinon vh
308
  const heightUnit = (isIOS && CSS.supports('height', '1dvh')) ? '100dvh' : '100vh';
309
  wrapper.style.height = heightUnit;
310
  wrapper.style.maxHeight = heightUnit;
311
- }
312
- });
313
-
314
- window.addEventListener('orientationchange', function () {
315
- if (isFullscreen) {
316
- setTimeout(function () {
317
- wrapper.style.width = '100vw';
318
- const heightUnit = (isIOS && CSS.supports('height', '1dvh')) ? '100dvh' : '100vh';
319
- wrapper.style.height = heightUnit;
320
- wrapper.style.maxHeight = heightUnit;
321
- }, 200);
322
- }
323
- });
 
301
  });
302
 
303
  // ─── 16. Resize / orientation ────────────────────────────────────────────────
304
+ window.addEventListener('resize', function () {
305
+ if (isFullscreen) {
306
+ wrapper.style.width = '100vw';
307
+ // Utilise dvh si disponible, sinon vh
308
+ const heightUnit = (isIOS && CSS.supports('height', '1dvh')) ? '100dvh' : '100vh';
309
+ wrapper.style.height = heightUnit;
310
+ wrapper.style.maxHeight = heightUnit;
311
+ }
312
+ });
313
+
314
+ window.addEventListener('orientationchange', function () {
315
+ if (isFullscreen) {
316
+ setTimeout(function () {
317
  wrapper.style.width = '100vw';
 
318
  const heightUnit = (isIOS && CSS.supports('height', '1dvh')) ? '100dvh' : '100vh';
319
  wrapper.style.height = heightUnit;
320
  wrapper.style.maxHeight = heightUnit;
321
+ }, 200);
322
+ }
323
+ });