吉安感知网项目-前端
罗广辉
2026-03-04 b5bbbd19cf0b3c2b7674e5ecb6c1847f0ec734e4
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawPolygonTool.js
@@ -91,6 +91,9 @@
   }
   start() {
      if (!this.tooltip) {
         this.tooltip = new MapTooltip(this.viewer)
      }
      this.dataSource = new Cesium.CustomDataSource('draw-polygon')
      this.viewer.dataSources.add(this.dataSource)
      this.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas)
@@ -139,10 +142,10 @@
      if (!this.isDrawing) return
      const tipText = this.getTipText()
      if (!this.tooltip?.isVisible) {
         this.tooltip.show(tipText, movement.endPosition)
         this.tooltip?.show(tipText, movement.endPosition)
      } else {
         this.tooltip.show(tipText)
         this.tooltip.move(movement.endPosition)
         this.tooltip?.show(tipText)
         this.tooltip?.move(movement.endPosition)
      }
      if (this.positions.length === 0) return
      const position = this.getPositionFromScreen(movement.endPosition)
@@ -283,7 +286,7 @@
      this.floatPosition = null
      this.isIntersecting = false
      this.notify('getPolygonPositions', this.positions)
      this.tooltip.hide()
      this.tooltip?.hide()
      this.clearPreviewEntities()
   }