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;
|
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) {
|
||||||
|
if (this.active) {
|
||||||
|
this.updateControls();
|
||||||
|
} else {
|
||||||
this.add();
|
this.add();
|
||||||
} else if (!selected && this.active) {
|
}
|
||||||
|
} else if (this.active) {
|
||||||
this.remove();
|
this.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue