mirror of
https://github.com/ethan-zf/cesium-plot-js.git
synced 2025-06-24 11:37:27 +00:00
修复双箭头整体被拖拽后生长动画路径不正确的问题
This commit is contained in:
parent
c08826089d
commit
c8b7d15d6e
@ -53,8 +53,6 @@ export default class DoubleArrow extends Base {
|
|||||||
this.lineEntity && this.viewer.entities.remove(this.lineEntity);
|
this.lineEntity && this.viewer.entities.remove(this.lineEntity);
|
||||||
} else {
|
} else {
|
||||||
this.finishDrawing();
|
this.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]);
|
|
||||||
|
|
||||||
// // 辅助查看插值控制点位置
|
// // 辅助查看插值控制点位置
|
||||||
// this.viewer.entities.add({
|
// this.viewer.entities.add({
|
||||||
@ -76,11 +74,11 @@ export default class DoubleArrow extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// finishDrawing() {
|
finishDrawing() {
|
||||||
// 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]);
|
||||||
// super.finishDrawing();
|
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.
|
||||||
*/
|
*/
|
||||||
|
@ -441,6 +441,11 @@ export default class Base {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.setGeometryPoints(newPoints);
|
this.setGeometryPoints(newPoints);
|
||||||
|
if (this.minPointsForShape === 4) {
|
||||||
|
// 双箭头在整体被拖拽时,需要同步更新生长动画的插值点
|
||||||
|
this.curveControlPointLeft = this.cesium.Cartesian3.add(this.curveControlPointLeft, translation, new this.cesium.Cartesian3());
|
||||||
|
this.curveControlPointRight = this.cesium.Cartesian3.add(this.curveControlPointRight, translation, new this.cesium.Cartesian3());
|
||||||
|
}
|
||||||
startPosition = newPosition;
|
startPosition = newPosition;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user