Procházet zdrojové kódy

Fix wrong aspect ration on OS X Safari

This fixes https://github.com/mpetroff/pannellum/issues/155. I'm sure it can be done more elegantly but it should point you in the right direction, basically recalculate aspect ration after full screen was entered and render one frame so that screen does not stay black.
pull/156/head
mzoeller před 8 roky
rodič
revize
cd915ecc50
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. +2
    -0
      src/js/pannellum.js

+ 2
- 0
src/js/pannellum.js Zobrazit soubor

@@ -1680,6 +1680,8 @@ function onFullScreenChange() {
if (document.fullscreen || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement) {
controls.fullscreen.classList.add('pnlm-fullscreen-toggle-button-active');
fullscreenActive = true;
// Fix wrong aspect ration on OS X Safari: https://github.com/mpetroff/pannellum/issues/155
renderer.resize(); render();
} else {
controls.fullscreen.classList.remove('pnlm-fullscreen-toggle-button-active');
fullscreenActive = false;


Načítá se…
Zrušit
Uložit