瀏覽代碼

Added function to add hotspot to another scene

pull/251/head
Prisacariu Alexandru 8 年之前
父節點
當前提交
9a4e9ddb35
共有 1 個檔案被更改,包括 17 行新增0 行删除
  1. +17
    -0
      src/js/pannellum.js

+ 17
- 0
src/js/pannellum.js 查看文件

@@ -2455,6 +2455,23 @@ this.addHotSpot = function(hs) {
}

/**
* Add a new hot spot to a specific scene.
* @memberof Viewer
* @instance
* @param {string} sceneId - The scene where to add the hot spot
* @param {Object} hs - The configuration for the hot spot
* @returns {boolean} True if the add was successful, else false
*/
this.addHotSpotToScene = function(sceneId, hs) {
// TODO: do some checks if it is the actual scene
if (initialConfig.scenes.hasOwnProperty(sceneId)) {
initialConfig.scenes[sceneId].hotSpots.push(hs);
return true;
}
return false;
}

/**
* Remove a hot spot.
* @memberof Viewer
* @instance


Loading…
取消
儲存