Browse Source

fix: 🧩 优化地图电梯

pull/24/head
张耀 3 years ago
parent
commit
2e30be32cd
  1. BIN
      public/static/img/num_bg.png
  2. 11
      public/static/qm/MainMap_QM.js

BIN
public/static/img/num_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

11
public/static/qm/MainMap_QM.js

@ -5774,12 +5774,17 @@ Facilities_QM.prototype.renderIcon = function (obj, _this, isShow = true, ele =
_this.serObj.add(sprite); _this.serObj.add(sprite);
if (obj.facCode == "dt") { if (obj.facCode == "dt") {
let shopDiv = document.createElement('div'); let shopDiv = document.createElement('div');
shopDiv.className = "map_label"
shopDiv.innerText = obj.title;
let sc = document.createElement('div');
sc.style.position = "relative"
sc.style.display = "flex";
sc.style.width = "47px";
sc.style.justifyContent = "center";
sc.innerHTML = `<img src="./static/img/num_bg.png" width="47" height="24" /><span style="color: #A6976F; font-size: 14px; position: absolute; top: 2px;">${obj.title}</span>`;
shopDiv.append(sc);
shopDiv.dataset.name = obj.title; shopDiv.dataset.name = obj.title;
shopDiv.dataset.nameEn = Map_QM.util.iconEn[obj.title]; shopDiv.dataset.nameEn = Map_QM.util.iconEn[obj.title];
let shopLabel = new THREE.CSS2DObject(shopDiv); let shopLabel = new THREE.CSS2DObject(shopDiv);
shopLabel.position.set(obj.x, -1 * obj.y, 0);
shopLabel.position.set(obj.x, -1 * obj.y, 110);
shopLabel.userData.mapShow = true; shopLabel.userData.mapShow = true;
_this.labelObj.add(shopLabel); _this.labelObj.add(shopLabel);
} }

Loading…
Cancel
Save