Skip to content

Commit

Permalink
fix(directions): search term change and map synchronization (#580)
Browse files Browse the repository at this point in the history
* fix(directions) Always subscribe to term change

* fix(directions) add layer to map synchronization

* refactior(directions) lint
  • Loading branch information
pelord authored and mbarbeau committed May 11, 2020
1 parent 514822f commit dc68fe3
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,12 @@ export class DirectionsFormComponent implements OnInit, OnDestroy {
])
});

if (!this.directionsFormService.getStops()) {
this.map.status$.pipe(take(1)).subscribe(() => {
this.conditionalInit();
});
} else {
this.conditionalInit();
}

}
setTimeout(() => {
this.initStores();
this.initOlInteraction();
}, 1);

private conditionalInit() {
this.initStores();
this.initOlInteraction();
this.subscribeToFormChange();

this.routesQueries$$.push(
this.stream$
.pipe(
Expand Down

0 comments on commit dc68fe3

Please sign in to comment.