mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-10-16 20:38:18 +00:00
fix routing controls add/update logic
This commit is contained in:
@@ -59,10 +59,14 @@ export class RoutingControls {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let selected = get(selection).hasAnyChildren(new ListFileItem(this.fileId), true, ['waypoints']);
|
let selected = get(selection).hasAnyChildren(new ListFileItem(this.fileId), true, ['waypoints']) && get(selection).size == 1;
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.add();
|
if (this.active) {
|
||||||
} else if (!selected && this.active) {
|
this.updateControls();
|
||||||
|
} else {
|
||||||
|
this.add();
|
||||||
|
}
|
||||||
|
} else if (this.active) {
|
||||||
this.remove();
|
this.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user