Browse Source

Merge 15ef86b19d into 1eaccef60f

pull/1131/merge
Wolfshe 1 month ago
committed by GitHub
parent
commit
22ac6e1494
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      src/js/pannellum.js

+ 17
- 0
src/js/pannellum.js View File

@@ -1869,6 +1869,23 @@ function createHotSpot(hs) {
else
div.className += ' pnlm-hotspot pnlm-sprite pnlm-' + escapeHTML(hs.type);

if ( 'thumbnail' in hs ) {
let thumbnail = hs.thumbnail;
div.addEventListener("mouseenter",function(){
div.style.backgroundImage = `url(${thumbnail})`;
div.style.border = "solid";
div.style.backgroundPosition = "center";
div.style.backgroundSize = "contain";
})

div.addEventListener("mouseleave",function(){
div.style.backgroundImage = "";
div.style.border = "";
div.style.backgroundPosition = "";
div.style.backgroundSize = "";
})
}

var span = document.createElement('span');
if (hs.text)
span.innerHTML = escapeHTML(hs.text);


Loading…
Cancel
Save