From 9859152fdaebb4162e80e8a112705bf397f35e09 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Tue, 23 Jun 2026 14:34:34 +0800
Subject: [PATCH] feat: 添加事件名称
---
applications/drone-command/src/utils/cesium/shapeTools/edit/EditRectangleTool.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/applications/drone-command/src/utils/cesium/shapeTools/edit/EditRectangleTool.js b/applications/drone-command/src/utils/cesium/shapeTools/edit/EditRectangleTool.js
index fd8f20e..d76693a 100644
--- a/applications/drone-command/src/utils/cesium/shapeTools/edit/EditRectangleTool.js
+++ b/applications/drone-command/src/utils/cesium/shapeTools/edit/EditRectangleTool.js
@@ -47,7 +47,7 @@
this.handler.setInputAction(evt => this.handleLeftDown(evt), Cesium.ScreenSpaceEventType.LEFT_DOWN)
this.handler.setInputAction(evt => this.handleMouseMove(evt), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
this.handler.setInputAction(() => this.handleLeftUp(), Cesium.ScreenSpaceEventType.LEFT_UP)
- this.tooltip.show('拖动顶点编辑', { x: 0, y: 0 })
+ this.tooltip.hide()
}
handleLeftDown(evt) {
@@ -60,7 +60,12 @@
}
handleMouseMove(evt) {
- this.tooltip.move(evt.endPosition)
+ if (!this.tooltip?.isVisible) {
+ this.tooltip.show('拖动顶点编辑', evt.endPosition)
+ } else {
+ this.tooltip.show('拖动顶点编辑')
+ this.tooltip.move(evt.endPosition)
+ }
if (this.dragIndex == null) return
const position = this.getPositionFromScreen(evt.endPosition)
if (!position) return
--
Gitblit v1.9.3