Browse Source

Fix bug with fade when rapidly changing scenes (fixes #73).

pull/86/head
Matthew Petroff 9 years ago
parent
commit
71b0a0c21f
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/js/pannellum.js

+ 3
- 2
src/js/pannellum.js View File

@@ -947,9 +947,10 @@ function renderInitCallback() {
if (config.sceneFadeDuration && oldRenderer.fadeImg !== undefined) {
oldRenderer.fadeImg.style.opacity = 0;
// Remove image
var fadeImg = oldRenderer.fadeImg;
oldRenderer = undefined;
setTimeout(function() {
renderContainer.removeChild(oldRenderer.fadeImg);
oldRenderer = undefined;
renderContainer.removeChild(fadeImg);
}, config.sceneFadeDuration);
}
}


Loading…
Cancel
Save