mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Update commit boundaries after moving waypoints.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1084
This commit is contained in:
@@ -479,7 +479,9 @@ class Flight {
|
||||
this.flight = flight;
|
||||
this.flightPlan = this.flight.flightPlan.map((p) => new Waypoint(p, this));
|
||||
this.path = null;
|
||||
this.commitBoundary = null;
|
||||
this.flight.flightPlanChanged.connect(() => this.draw());
|
||||
this.flight.commitBoundaryChanged.connect(() => this.drawCommitBoundary());
|
||||
}
|
||||
|
||||
shouldMark(waypoint) {
|
||||
@@ -509,9 +511,14 @@ class Flight {
|
||||
}
|
||||
|
||||
drawCommitBoundary() {
|
||||
if (this.commitBoundary != null) {
|
||||
this.commitBoundary
|
||||
.removeFrom(this.flightPlanLayer())
|
||||
.removeFrom(selectedFlightPlansLayer);
|
||||
}
|
||||
if (this.flight.selected) {
|
||||
if (this.flight.commitBoundary) {
|
||||
L.polyline(this.flight.commitBoundary, {
|
||||
this.commitBoundary = L.polyline(this.flight.commitBoundary, {
|
||||
color: Colors.Highlight,
|
||||
weight: 1,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user