Browse Source

Add support for URL specified firstScene.

This allows references to the standalone viewer to start in the
"middle" of a tour.
pull/101/head
Arthur Peters 9 years ago
parent
commit
0ecf742c19
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/js/pannellum.js

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

@@ -178,8 +178,11 @@ compass.className = 'pnlm-compass pnlm-controls pnlm-control';
container.appendChild(compass);

// Load and process configuration
if (initialConfig.default && initialConfig.default.firstScene) {
// Activate first scene if specified
if (initialConfig.firstScene) {
// Activate first scene if specified in URL
mergeConfig(initialConfig.firstScene);
} else if (initialConfig.default && initialConfig.default.firstScene) {
// Activate first scene if specified in file
mergeConfig(initialConfig.default.firstScene);
} else {
mergeConfig(null);


Loading…
Cancel
Save