Browse Source

Properly handle dynamic first scene without need to manually call `setUpdate`.

tags/2.5.0
Matthew Petroff 5 years ago
parent
commit
1b92bf32b4
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      src/js/pannellum.js

+ 7
- 7
src/js/pannellum.js View File

@@ -446,6 +446,13 @@ function init() {
if (config.draggable)
uiContainer.classList.add('pnlm-grab');
uiContainer.classList.remove('pnlm-grabbing');

// Properly handle switching to dynamic scenes
update = config.dynamicUpdate === true;
if (config.dynamic) {
panoImage = config.panorama;
onImageLoad();
}
}

/**
@@ -2293,13 +2300,6 @@ function loadScene(sceneId, targetPitch, targetYaw, targetHfov, fadeDone) {
}
fireEvent('scenechange', sceneId);
load();

// Properly handle switching to dynamic scenes
update = config.dynamicUpdate === true;
if (config.dynamic) {
panoImage = config.panorama;
onImageLoad();
}
}

/**


Loading…
Cancel
Save