Browse Source

Tweak the position of the immersive viewport

customisations
alemart 1 year ago
parent
commit
2ce01af236
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/core/viewport.ts

+ 2
- 2
src/core/viewport.ts View File

879
                 viewportHeight = (viewportWidth / viewportAspectRatio) | 0;
879
                 viewportHeight = (viewportWidth / viewportAspectRatio) | 0;
880
             }
880
             }
881
 
881
 
882
-            container.style.left = `calc(50% - ${viewportWidth >>> 1}px)`;
883
-            container.style.top = `calc(50% - ${viewportHeight >>> 1}px)`;
882
+            container.style.left = `calc(50% - ${(viewportWidth+1) >>> 1}px)`;
883
+            container.style.top = `calc(50% - ${(viewportHeight+1) >>> 1}px)`;
884
             container.style.width = viewportWidth + 'px';
884
             container.style.width = viewportWidth + 'px';
885
             container.style.height = viewportHeight + 'px';
885
             container.style.height = viewportHeight + 'px';
886
         }
886
         }

Loading…
Cancel
Save