MikaFil commited on
Commit
8bc1807
·
verified ·
1 Parent(s): 2a83384

Update fullscreen_playcanvas.js

Browse files
Files changed (1) hide show
  1. fullscreen_playcanvas.js +6 -13
fullscreen_playcanvas.js CHANGED
@@ -62,12 +62,9 @@
62
  top: 0 !important;
63
  left: 0 !important;
64
  width: 100vw !important;
65
- /* Fallback pour vieux navigateurs */
66
- height: 100vh !important;
67
- /* iOS 16+ et navigateurs modernes : s'adapte aux barres dynamiques */
68
- height: 100dvh !important;
69
  max-width: 100vw !important;
70
- max-height: 100dvh !important;
71
  padding-bottom: 0 !important;
72
  margin: 0 !important;
73
  z-index: 99999;
@@ -304,10 +301,7 @@
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
 
@@ -315,9 +309,8 @@
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
- });
 
 
62
  top: 0 !important;
63
  left: 0 !important;
64
  width: 100vw !important;
65
+ height: 100vh !important;
 
 
 
66
  max-width: 100vw !important;
67
+ max-height: 100vh !important;
68
  padding-bottom: 0 !important;
69
  margin: 0 !important;
70
  z-index: 99999;
 
301
  window.addEventListener('resize', function () {
302
  if (isFullscreen) {
303
  wrapper.style.width = '100vw';
304
+ wrapper.style.height = '100vh';
 
 
 
305
  }
306
  });
307
 
 
309
  if (isFullscreen) {
310
  setTimeout(function () {
311
  wrapper.style.width = '100vw';
312
+ wrapper.style.height = '100vh';
 
 
313
  }, 200);
314
  }
315
+ });
316
+ })();