浏览代码

Add files via upload

pull/1131/head
Wolfshe 1年前
committed by GitHub
父节点
当前提交
15ef86b19d
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. +17
    -0
      src/js/pannellum.js

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

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


正在加载...
取消
保存