summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchenjinsong <[email protected]>2024-03-15 15:34:20 +0800
committerchenjinsong <[email protected]>2024-03-15 15:34:20 +0800
commit2357701525f5d8445b2beb9d440d2a28a5a34b98 (patch)
treed13df332cf38ce69c3db23f5368040fde98293df
parente2be69f7913b15f5b885f97df3034a276c29aec6 (diff)
CN-1563 fix: tracking页六边形tooltip位置控制不让其超出屏幕下边界
-rw-r--r--src/views/location/Index.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/views/location/Index.vue b/src/views/location/Index.vue
index bd26d025..1ec94562 100644
--- a/src/views/location/Index.vue
+++ b/src/views/location/Index.vue
@@ -1104,15 +1104,15 @@ export default {
this.currentPolygon = features[0].properties
this.currentPolygon.id = features[0].id
this.currentPolygon.location = `${h3ToGeo(this.currentPolygon.hexId)[1]}, ${h3ToGeo(this.currentPolygon.hexId)[0]}`
- this.tooltip.x = originalEvent.clientX + 15
- this.tooltip.y = originalEvent.clientY + 5
- /* this.$nextTick(() => {
+ // this.tooltip.x = originalEvent.clientX + 15
+ // this.tooltip.y = originalEvent.clientY + 5
+ this.$nextTick(() => {
const tooltipDom = document.getElementById('tooltip')
const tooltipDomHeight = tooltipDom.offsetHeight
this.tooltip.x = originalEvent.clientX + 15
this.tooltip.y = originalEvent.clientY + 5
this.tooltip.y = (originalEvent.clientY + 5 + tooltipDomHeight) > this.mapDomHeight ? (this.mapDomHeight - tooltipDomHeight) : (originalEvent.clientY + 5)
- }) */
+ })
// 鼠标滑过高亮
this.hoverTrigger('trackingHexGrid', this.currentPolygon.id, true)