mirror of
https://github.com/ethan-zf/cesium-plot-js.git
synced 2025-06-24 03:27:29 +00:00
Fixed the issue with the line connecting the first two points of the SquadCombat.
This commit is contained in:
parent
ebcd177bf5
commit
79c9e449fc
@ -22,6 +22,18 @@ export default class SquadCombat extends AttackArrow {
|
||||
this.tailWidthFactor = 0.1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add points only on click events
|
||||
*/
|
||||
addPoint(cartesian: Cartesian3) {
|
||||
this.points.push(cartesian);
|
||||
if (this.points.length < 2) {
|
||||
this.onMouseMove();
|
||||
} else if (this.points.length > 2) {
|
||||
this.lineEntity && this.viewer.entities.remove(this.lineEntity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a shape based on mouse movement points during the initial drawing.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user