fix routing controls add/update logic
This commit is contained in:
parent
30e1cac0a9
commit
8e085a718f
1 changed files with 7 additions and 3 deletions
|
@ -59,10 +59,14 @@ export class RoutingControls {
|
|||
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) {
|
||||
this.add();
|
||||
} else if (!selected && this.active) {
|
||||
if (this.active) {
|
||||
this.updateControls();
|
||||
} else {
|
||||
this.add();
|
||||
}
|
||||
} else if (this.active) {
|
||||
this.remove();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue