From 4cd17f4e640ae22ec64eb170468d1154d9a1eff5 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 31 Jan 2026 16:09:27 +0800
Subject: [PATCH] feat: 地图提示挪走

---
 packages/utils/map/MapTooltip.js |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/applications/drone-command/src/utils/cesium/shapeTools/Tooltip.js b/packages/utils/map/MapTooltip.js
similarity index 91%
rename from applications/drone-command/src/utils/cesium/shapeTools/Tooltip.js
rename to packages/utils/map/MapTooltip.js
index 6ad6aef..4e07abf 100644
--- a/applications/drone-command/src/utils/cesium/shapeTools/Tooltip.js
+++ b/packages/utils/map/MapTooltip.js
@@ -1,4 +1,4 @@
-export class MapTooltip {
+export class MapTooltip {
 	constructor(viewer, options = {}) {
 		this.viewer = viewer
 		this.options = options
@@ -40,14 +40,7 @@
 		if (!this.tooltipEl || !position) return
 		const width = this.container?.clientWidth ?? 0
 		const height = this.container?.clientHeight ?? 0
-		if (
-			!width ||
-			!height ||
-			position.x < 0 ||
-			position.y < 0 ||
-			position.x > width ||
-			position.y > height
-		) {
+		if (!width || !height || position.x < 0 || position.y < 0 || position.x > width || position.y > height) {
 			this.hide()
 			return
 		}

--
Gitblit v1.9.3