From 8872fbb3b6def931350d18515bf6d40f4dab0ce1 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Tue, 18 Apr 2023 15:34:42 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs
---
src/utils/tools/EditTool.js | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/utils/tools/EditTool.js b/src/utils/tools/EditTool.js
index efc8595..63d3371 100644
--- a/src/utils/tools/EditTool.js
+++ b/src/utils/tools/EditTool.js
@@ -22,7 +22,7 @@
class EditTool {
constructor() {
this._viewer = undefined
- this._anchorLayer = undefined
+ this._anchorLayer = new global.DC.Namespace.Cesium.CustomDataSource('tool-three-edit-anchor-layer')
this._options = {}
this._plotEvent = new PlotEvent()
this._tooltipMess = undefined
@@ -245,8 +245,7 @@
* @returns {EditTool}
*/
activate (options = {}) {
- this._anchorLayer = new global.DC.Namespace.Cesium.CustomDataSource('edit-anchor-layer')
- this._viewer.dataSources.add(this._anchorLayer)
+ this._anchorLayer.entities.removeAll()
this._viewer.tooltip.enable = true
this._options = { ...DEF_OPTS, ...options }
@@ -265,7 +264,6 @@
this._viewer.tooltip.enable = false
this._anchorLayer.entities.removeAll()
this._anchors = []
- this._viewer.dataSources.remove(this._anchorLayer)
return this
}
@@ -275,6 +273,7 @@
*/
install (viewer) {
this._viewer = viewer
+ this._viewer.dataSources.add(this._anchorLayer)
Object.defineProperty(this._viewer, 'curEditTool', {
value: this,
writable: true,
--
Gitblit v1.9.3