From c7781a42356330032669743e98d471bc72baacc3 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Sat, 31 Jan 2026 16:23:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
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