Stop pathfinding if the measurement is canceled mid-pathfinding

This commit is contained in:
Manuel Vögele
2022-10-04 21:32:26 +02:00
parent 4957188630
commit 7a00d6fcc2
+4
View File
@@ -338,6 +338,10 @@ export function extendRuler() {
_endMeasurement() {
super._endMeasurement();
this.draggedEntity = null;
if (this.pathfindingJob) {
routinglib.cancelPathfinding(this.pathfindingJob);
this.pathfindingJob = undefined;
}
}
// The functions below aren't present in the orignal Ruler class and are added by Drag Ruler