mirror of
				https://github.com/ethan-zf/cesium-plot-js.git
				synced 2025-11-04 01:04:18 +00:00 
			
		
		
		
	修复:双箭头执行生长动画后,编辑状态无法拖拽的问题
This commit is contained in:
		
							parent
							
								
									fd84d28a84
								
							
						
					
					
						commit
						c08826089d
					
				@ -56,8 +56,8 @@ export default class DoubleArrow extends Base {
 | 
				
			|||||||
      this.curveControlPointLeft = this.cesium.Cartesian3.fromDegrees(this.llBodyPnts[2][0], this.llBodyPnts[2][1]);
 | 
					      this.curveControlPointLeft = this.cesium.Cartesian3.fromDegrees(this.llBodyPnts[2][0], this.llBodyPnts[2][1]);
 | 
				
			||||||
      this.curveControlPointRight = this.cesium.Cartesian3.fromDegrees(this.rrBodyPnts[1][0], this.rrBodyPnts[1][1]);
 | 
					      this.curveControlPointRight = this.cesium.Cartesian3.fromDegrees(this.rrBodyPnts[1][0], this.rrBodyPnts[1][1]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // 辅助查看插值控制点位置
 | 
					      // // 辅助查看插值控制点位置
 | 
				
			||||||
      // this.CesiumViewer.entities.add({
 | 
					      // this.viewer.entities.add({
 | 
				
			||||||
      // 	position: this.curveControlPointLeft,
 | 
					      // 	position: this.curveControlPointLeft,
 | 
				
			||||||
      // 	point: {
 | 
					      // 	point: {
 | 
				
			||||||
      // 		pixelSize: 10,
 | 
					      // 		pixelSize: 10,
 | 
				
			||||||
@ -65,7 +65,7 @@ export default class DoubleArrow extends Base {
 | 
				
			|||||||
      // 		color: this.cesium.Color.RED,
 | 
					      // 		color: this.cesium.Color.RED,
 | 
				
			||||||
      // 	},
 | 
					      // 	},
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      // this.CesiumViewer.entities.add({
 | 
					      // this.viewer.entities.add({
 | 
				
			||||||
      // 	position: this.curveControlPointRight,
 | 
					      // 	position: this.curveControlPointRight,
 | 
				
			||||||
      // 	point: {
 | 
					      // 	point: {
 | 
				
			||||||
      // 		pixelSize: 10,
 | 
					      // 		pixelSize: 10,
 | 
				
			||||||
@ -75,6 +75,12 @@ export default class DoubleArrow extends Base {
 | 
				
			|||||||
      // });
 | 
					      // });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // finishDrawing() {
 | 
				
			||||||
 | 
					  //   this.curveControlPointLeft = this.cesium.Cartesian3.fromDegrees(this.llBodyPnts[2][0], this.llBodyPnts[2][1]);
 | 
				
			||||||
 | 
					  //   this.curveControlPointRight = this.cesium.Cartesian3.fromDegrees(this.rrBodyPnts[1][0], this.rrBodyPnts[1][1]);
 | 
				
			||||||
 | 
					  //   super.finishDrawing();
 | 
				
			||||||
 | 
					  // }
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * Draw a shape based on mouse movement points during the initial drawing.
 | 
					   * Draw a shape based on mouse movement points during the initial drawing.
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
 | 
				
			|||||||
@ -725,10 +725,7 @@ export default class Base {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  private doubleArrowGrowthAnimation(duration: number = 2000, delay: number = 0, callback?: Function) {
 | 
					  private doubleArrowGrowthAnimation(duration: number = 2000, delay: number = 0, callback?: Function) {
 | 
				
			||||||
    setTimeout(() => {
 | 
					    setTimeout(() => {
 | 
				
			||||||
      this.viewer.entities.remove(this.polygonEntity);
 | 
					      this.hideWithAnimation(0, 0, undefined);
 | 
				
			||||||
      this.viewer.entities.remove(this.outlineEntity);
 | 
					 | 
				
			||||||
      this.polygonEntity = null;
 | 
					 | 
				
			||||||
      this.outlineEntity = null;
 | 
					 | 
				
			||||||
      const points = this.getPoints();
 | 
					      const points = this.getPoints();
 | 
				
			||||||
      let startTime = Date.now();
 | 
					      let startTime = Date.now();
 | 
				
			||||||
      this.viewer.clock.shouldAnimate = true;
 | 
					      this.viewer.clock.shouldAnimate = true;
 | 
				
			||||||
@ -783,7 +780,7 @@ export default class Base {
 | 
				
			|||||||
        tempPoints[3] = newPositionLeft;
 | 
					        tempPoints[3] = newPositionLeft;
 | 
				
			||||||
        const geometryPoints = this.createGraphic(tempPoints);
 | 
					        const geometryPoints = this.createGraphic(tempPoints);
 | 
				
			||||||
        this.setGeometryPoints(geometryPoints);
 | 
					        this.setGeometryPoints(geometryPoints);
 | 
				
			||||||
        this.drawPolygon();
 | 
					        this.showWithAnimation(0, 0, undefined);
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      this.viewer.clock.onTick.addEventListener(frameListener);
 | 
					      this.viewer.clock.onTick.addEventListener(frameListener);
 | 
				
			||||||
    }, delay);
 | 
					    }, delay);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user