吉安感知网项目-前端
shuishen
2026-02-03 89380e6260a75d1d3b94de687ebcc2f50d50659d
applications/drone-command/src/utils/cesium/shapeTools/edit/EditPolygonTool.js
@@ -1,5 +1,5 @@
import * as Cesium from 'cesium'
import { MapTooltip } from '../Tooltip'
import { MapTooltip } from '@ztzf/utils'
import { ToolBase } from '../ToolBase'
const POINT_ENTITY_NAME = 'edit-polygon-point'
@@ -74,7 +74,12 @@
   }
   handleMouseMove(movement) {
      this.tooltip.show('拖动顶点编辑,右键删除点', movement.endPosition)
      if (!this.tooltip?.isVisible) {
         this.tooltip.show('????????????', movement.endPosition)
      } else {
         this.tooltip.show('????????????')
         this.tooltip.move(movement.endPosition)
      }
      if (!this.isDragging || this.draggedIndex < 0) return
      const position = this.getPositionFromScreen(movement.endPosition)
      if (!position) return
@@ -101,10 +106,7 @@
   createEntities() {
      this.polygonEntity = this.dataSource.entities.add({
         polygon: {
            hierarchy: new Cesium.CallbackProperty(
               () => new Cesium.PolygonHierarchy(this.positions),
               false
            ),
            hierarchy: new Cesium.CallbackProperty(() => new Cesium.PolygonHierarchy(this.positions), false),
            material: this.style.fill,
            outline: false,
            heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,