瀏覽代碼

Add functionality to execute javascript functions when clicking or touching on hotspots

pull/260/head
Dieter Meiller 8 年之前
父節點
當前提交
0ca7677033
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. +16
    -0
      src/js/pannellum.js

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

@@ -1593,6 +1593,22 @@ function createHotSpot(hs) {
div.style.cursor = 'pointer';
span.style.cursor = 'pointer';
a.appendChild(div);
} else if (hs.action) {
a = document.createElement('a');
a.href = "#";
a.ontouchstart = function() {
this.touchAvailable = true;
hs.action();
};
a.onclick = function() {
if (!this.touchAvailable) {
hs.action();
}
};
renderContainer.appendChild(a);
div.style.cursor = 'pointer';
span.style.cursor = 'pointer';
a.appendChild(div);
} else {
if (hs.sceneId) {
div.onclick = function() {


Loading…
取消
儲存