Quellcode durchsuchen

Add files via upload

pull/1131/head
Wolfshe vor 1 Jahr
committed by GitHub
Ursprung
Commit
15ef86b19d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
1 geänderte Dateien mit 17 neuen und 0 gelöschten Zeilen
  1. +17
    -0
      src/js/pannellum.js

+ 17
- 0
src/js/pannellum.js Datei anzeigen

@@ -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);


Laden…
Abbrechen
Speichern