吉安感知网项目-前端
shuishen
2026-02-02 1d3e8e3a14f09e42ee47d8e8b6cc5feb6c4f7c79
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawEllipseTool.js
@@ -37,7 +37,7 @@
      this.handler.setInputAction(movement => this.handleMouseMove(movement), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
      this.drawStep = 0
      this.isCompleted = false
      this.tooltip.show('单击设置中心点', { x: 0, y: 0 })
      this.tooltip.hide()
   }
   handleLeftClick(click) {
@@ -87,7 +87,17 @@
   handleMouseMove(movement) {
      if (this.isCompleted) return
      this.tooltip.move(movement.endPosition)
      const tipText = this.drawStep === 0
         ? '单击设置中心点'
         : this.drawStep === 1
            ? '单击设置长轴'
            : '单击设置短轴'
      if (!this.tooltip?.isVisible) {
         this.tooltip.show(tipText, movement.endPosition)
      } else {
         this.tooltip.show(tipText)
         this.tooltip.move(movement.endPosition)
      }
      if (!this.isDrawing) return
      const position = this.getPositionFromScreen(movement.endPosition)
      if (!position) return