From 9bd82b69690a9c9190f61e9bfce9ce6110ca54b5 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Mon, 10 Nov 2025 16:29:48 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test
---
src/views/layerManagement/components/utils.js | 35 +----------------------------------
1 files changed, 1 insertions(+), 34 deletions(-)
diff --git a/src/views/layerManagement/components/utils.js b/src/views/layerManagement/components/utils.js
index 65ee603..7001570 100644
--- a/src/views/layerManagement/components/utils.js
+++ b/src/views/layerManagement/components/utils.js
@@ -180,35 +180,7 @@
}
- // 清除不在范围内的点
- removeLastInvalidPoint() {
- const posLen = this.curPolygon.positions.length
- if (posLen === 0) return
- let targetPointId = ''
- let removeCount = 0
-
- if (posLen === 2) {
- removeCount = 2
- targetPointId = `${DrawPolygon.ENTITY_NAMES.POINT_ID_PREFIX}0`
- } else if (posLen > 2) {
- removeCount = 1
- const pointIndex = posLen - 2
- targetPointId = `${DrawPolygon.ENTITY_NAMES.POINT_ID_PREFIX}${pointIndex}`
- }
-
- this.curPolygon.positions.splice(posLen - removeCount, removeCount)
-
- const invalidPoint = this.editPolygonPointDataSource.entities.getById(targetPointId)
- if (invalidPoint) {
- this.editPolygonPointDataSource.entities.remove(invalidPoint)
- }
-
- if (this.curPolygon.positions.length === 0 && this.polygonEntity) {
- this.editPolygonDataSource.entities.remove(this.polygonEntity)
- this.polygonEntity = null
- }
- }
// 添加一个点
addPosition(position, isAdd = true) {
// 第一个点要重复压入一次,形成动态绘制效果
@@ -449,12 +421,7 @@
this.notify('getPolygonPositions', [])
this.startDrawing()
}
- // 删除图斑
- delSpot() {
- this.removeEntities()
- this.isPreviewMode = true
- this.startDrawing()
- }
+
// 删除端点
delPoint() {
if (this.curPolygon.positions.length <= 3) {
--
Gitblit v1.9.3