Browse Source

Fix fullscreen in Safari (fixes #155).

pull/160/head
Matthew Petroff 8 years ago
parent
commit
d1615f4b6a
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      src/js/pannellum.js

+ 8
- 4
src/js/pannellum.js View File

@@ -1111,10 +1111,10 @@ function keyRepeat() {
* @private * @private
*/ */
function onDocumentResize() { function onDocumentResize() {
// Resize panorama renderer
renderer.resize();
animateInit();
// Resize panorama renderer (moved to onFullScreenChange)
//renderer.resize();
//animateInit();
// Kludge to deal with WebKit regression: https://bugs.webkit.org/show_bug.cgi?id=93525 // Kludge to deal with WebKit regression: https://bugs.webkit.org/show_bug.cgi?id=93525
onFullScreenChange(); onFullScreenChange();
} }
@@ -1684,6 +1684,10 @@ function onFullScreenChange() {
controls.fullscreen.classList.remove('pnlm-fullscreen-toggle-button-active'); controls.fullscreen.classList.remove('pnlm-fullscreen-toggle-button-active');
fullscreenActive = false; fullscreenActive = false;
} }

// Resize renderer (deal with browser quirks and fixes #155)
renderer.resize();
animateInit();
} }


/** /**


Loading…
Cancel
Save