CN-1717 fix: 隐藏图标的zoom阈值改为11

This commit is contained in:
chenjinsong
2024-11-04 14:54:28 +08:00
parent a6efef25af
commit 45ee5f2680

View File

@@ -1103,7 +1103,7 @@ export default {
el.classList.add('map-marker--highlight') el.classList.add('map-marker--highlight')
} }
// 非关注的用户,默认隐藏图标,鼠标移到列表后才显示 // 非关注的用户,默认隐藏图标,鼠标移到列表后才显示
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
el.classList.add('map-marker--hidden') el.classList.add('map-marker--hidden')
} }
if (!marker.isFollowed && this.onlyShowFollowed) { if (!marker.isFollowed && this.onlyShowFollowed) {
@@ -1127,7 +1127,7 @@ export default {
el.classList.add('map-marker--highlight') el.classList.add('map-marker--highlight')
} }
// 非关注的用户,默认隐藏图标,鼠标移到列表后才显示 // 非关注的用户,默认隐藏图标,鼠标移到列表后才显示
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
el.classList.add('map-marker--hidden') el.classList.add('map-marker--hidden')
} }
if (!marker.isFollowed && this.onlyShowFollowed) { if (!marker.isFollowed && this.onlyShowFollowed) {
@@ -1147,7 +1147,7 @@ export default {
} else if (type === this.tooltipType.baseStation) { } else if (type === this.tooltipType.baseStation) {
const el = document.createElement('div') const el = document.createElement('div')
el.className = `map-marker map-marker--${type}` el.className = `map-marker map-marker--${type}`
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
el.classList.add('map-marker--hidden') el.classList.add('map-marker--hidden')
} }
el.innerHTML = baseStationSvg el.innerHTML = baseStationSvg
@@ -1160,7 +1160,7 @@ export default {
} else if (type === this.tooltipType.cell) { } else if (type === this.tooltipType.cell) {
const el = document.createElement('div') const el = document.createElement('div')
el.className = `map-marker map-marker--${type}` el.className = `map-marker map-marker--${type}`
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
el.classList.add('map-marker--hidden') el.classList.add('map-marker--hidden')
} }
el.innerHTML = cellSvg el.innerHTML = cellSvg
@@ -1376,7 +1376,7 @@ export default {
console.info(`current zoom: ${this.currentZoom}`) console.info(`current zoom: ${this.currentZoom}`)
if (this.activeTab === 'traceTracking') { if (this.activeTab === 'traceTracking') {
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
this.hideBaseStation() this.hideBaseStation()
} else { } else {
this.showBaseStation() this.showBaseStation()
@@ -1430,7 +1430,7 @@ export default {
trackingHexagonZoomEnd () { trackingHexagonZoomEnd () {
this.currentZoom = this.mapChart.getZoom() this.currentZoom = this.mapChart.getZoom()
console.info(`current zoom: ${this.currentZoom}`) console.info(`current zoom: ${this.currentZoom}`)
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
this.hideBaseStation() this.hideBaseStation()
} else { } else {
this.showBaseStation() this.showBaseStation()
@@ -1984,7 +1984,7 @@ export default {
find.removeClassName && find.removeClassName('map-marker--unfollowed') find.removeClassName && find.removeClassName('map-marker--unfollowed')
} }
// 变更地图上图标的class // 变更地图上图标的class
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
this.hideBaseStation() this.hideBaseStation()
this.hideFollowed() this.hideFollowed()
} else { } else {
@@ -1999,7 +1999,7 @@ export default {
find.addClassName && find.addClassName('map-marker--unfollowed') find.addClassName && find.addClassName('map-marker--unfollowed')
} }
// 变更地图上图标的class // 变更地图上图标的class
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
this.hideBaseStation() this.hideBaseStation()
this.hideFollowed() this.hideFollowed()
} else { } else {
@@ -2041,7 +2041,7 @@ export default {
if (find) { if (find) {
find.addClassName && find.addClassName('map-marker--unfollowed') find.addClassName && find.addClassName('map-marker--unfollowed')
} }
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
this.hideBaseStation() this.hideBaseStation()
this.hideFollowed() this.hideFollowed()
} else { } else {
@@ -2065,7 +2065,7 @@ export default {
if (find) { if (find) {
find.removeClassName && find.removeClassName('map-marker--unfollowed') find.removeClassName && find.removeClassName('map-marker--unfollowed')
} }
if (this.currentZoom && this.currentZoom < 6) { if (this.currentZoom && this.currentZoom < 11) {
this.hideBaseStation() this.hideBaseStation()
this.hideFollowed() this.hideFollowed()
} else { } else {
@@ -2334,7 +2334,7 @@ export default {
}, },
currentZoom (n, o) { currentZoom (n, o) {
// zoom 小于11隐藏 marker // zoom 小于11隐藏 marker
if (o && n < 6) { if (o && n < 11) {
this.hideBaseStation() this.hideBaseStation()
this.hideFollowed() this.hideFollowed()
} else { } else {