mirror of
https://github.com/ethan-zf/cesium-plot-js.git
synced 2025-06-23 19:17:29 +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.curveControlPointRight = this.cesium.Cartesian3.fromDegrees(this.rrBodyPnts[1][0], this.rrBodyPnts[1][1]);
|
||||
|
||||
// 辅助查看插值控制点位置
|
||||
// this.CesiumViewer.entities.add({
|
||||
// // 辅助查看插值控制点位置
|
||||
// this.viewer.entities.add({
|
||||
// position: this.curveControlPointLeft,
|
||||
// point: {
|
||||
// pixelSize: 10,
|
||||
@ -65,7 +65,7 @@ export default class DoubleArrow extends Base {
|
||||
// color: this.cesium.Color.RED,
|
||||
// },
|
||||
// });
|
||||
// this.CesiumViewer.entities.add({
|
||||
// this.viewer.entities.add({
|
||||
// position: this.curveControlPointRight,
|
||||
// point: {
|
||||
// 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.
|
||||
*/
|
||||
|
@ -278,7 +278,7 @@ export default class Base {
|
||||
this.tempLineEntity = this.addLineEntity(lineStyle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
removeTempLine() {
|
||||
if (this.tempLineEntity) {
|
||||
this.viewer.entities.remove(this.tempLineEntity);
|
||||
@ -725,10 +725,7 @@ export default class Base {
|
||||
|
||||
private doubleArrowGrowthAnimation(duration: number = 2000, delay: number = 0, callback?: Function) {
|
||||
setTimeout(() => {
|
||||
this.viewer.entities.remove(this.polygonEntity);
|
||||
this.viewer.entities.remove(this.outlineEntity);
|
||||
this.polygonEntity = null;
|
||||
this.outlineEntity = null;
|
||||
this.hideWithAnimation(0, 0, undefined);
|
||||
const points = this.getPoints();
|
||||
let startTime = Date.now();
|
||||
this.viewer.clock.shouldAnimate = true;
|
||||
@ -783,7 +780,7 @@ export default class Base {
|
||||
tempPoints[3] = newPositionLeft;
|
||||
const geometryPoints = this.createGraphic(tempPoints);
|
||||
this.setGeometryPoints(geometryPoints);
|
||||
this.drawPolygon();
|
||||
this.showWithAnimation(0, 0, undefined);
|
||||
};
|
||||
this.viewer.clock.onTick.addEventListener(frameListener);
|
||||
}, delay);
|
||||
|
Loading…
Reference in New Issue
Block a user