瀏覽代碼

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 年之前
父節點
當前提交
0ecf742c19
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. +5
    -2
      src/js/pannellum.js

+ 5
- 2
src/js/pannellum.js 查看文件

@@ -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…
取消
儲存