Browse Source

Image hotspots too

pull/12/head
Guillaume de Bure 10 years ago
parent
commit
7b2daaca77
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      src/js/pannellum.js

+ 12
- 1
src/js/pannellum.js View File

@@ -493,7 +493,18 @@ function createHotSpots() {
video.setAttribute('controls',true);
video.setAttribute('width',hs.width);
document.getElementById('page').appendChild(div);
span.appendChild(video)
span.appendChild(video);
} else if (hs.image) {
var a = document.createElement('a');
a.setAttribute('href', hs.image);
a.setAttribute('target', '_blank');
span.appendChild(a);
var image = document.createElement('img');
image.setAttribute('src',hs.image);
image.setAttribute('width',hs.width);
document.getElementById('page').appendChild(div);
a.appendChild(image);
} else {
if(hs.sceneId) {
div.onclick = function() {


Loading…
Cancel
Save