Selaa lähdekoodia

Add files via upload

pull/1131/head
Wolfshe 1 vuosi sitten
committed by GitHub
vanhempi
commit
15ef86b19d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 muutettua tiedostoa jossa 17 lisäystä ja 0 poistoa
  1. +17
    -0
      src/js/pannellum.js

+ 17
- 0
src/js/pannellum.js Näytä tiedosto

@@ -1863,6 +1863,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);


Ladataan…
Peruuta
Tallenna