From 275b4e71b35825c820fba57e3a52d3d7ba691920 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 28 Jan 2026 18:50:02 +0800
Subject: [PATCH] feat:椭圆及缓冲圆绘制逻辑调整

---
 applications/drone-command/src/views/areaManage/partition/shapeTools/draw/DrawBufferCircleTool.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/applications/drone-command/src/views/areaManage/partition/shapeTools/draw/DrawBufferCircleTool.js b/applications/drone-command/src/views/areaManage/partition/shapeTools/draw/DrawBufferCircleTool.js
index e03d524..ca5d4a9 100644
--- a/applications/drone-command/src/views/areaManage/partition/shapeTools/draw/DrawBufferCircleTool.js
+++ b/applications/drone-command/src/views/areaManage/partition/shapeTools/draw/DrawBufferCircleTool.js
@@ -20,6 +20,7 @@
 		this.circleLevel3OutlineEntity = null
 		this.isDrawing = false
 		this.drawStep = 0
+		this.isCompleted = false
 	}
 
 	start() {
@@ -29,10 +30,12 @@
 		this.handler.setInputAction(click => this.handleLeftClick(click), Cesium.ScreenSpaceEventType.LEFT_CLICK)
 		this.handler.setInputAction(movement => this.handleMouseMove(movement), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
 		this.drawStep = 0
+		this.isCompleted = false
 		this.tooltip.show('单击设置中心点', { x: 0, y: 0 })
 	}
 
 	handleLeftClick(click) {
+		if (this.isCompleted) return
 		const position = this.getPositionFromScreen(click.position)
 		if (!position) return
 
@@ -72,6 +75,7 @@
 			this.radiusLevel3 = Math.max(radius, this.radiusLevel2)
 			this.isDrawing = false
 			this.drawStep = 0
+			this.isCompleted = true
 			const positions = buildEllipsePositions(this.centerCartesian, this.radiusLevel3, this.radiusLevel3)
 			this.notify('getPolygonPositions', {
 				positions,
@@ -86,6 +90,7 @@
 	}
 
 	handleMouseMove(movement) {
+		if (this.isCompleted) return
 		this.tooltip.move(movement.endPosition)
 		if (!this.isDrawing) return
 		const position = this.getPositionFromScreen(movement.endPosition)
@@ -226,5 +231,6 @@
 		this.radiusLevel3 = 0
 		this.isDrawing = false
 		this.drawStep = 0
+		this.isCompleted = false
 	}
 }

--
Gitblit v1.9.3