diff --git a/packages/geo/src/lib/feature/feature-details/feature-details.component.html b/packages/geo/src/lib/feature/feature-details/feature-details.component.html index 65a8d7ee76..42014cc336 100644 --- a/packages/geo/src/lib/feature/feature-details/feature-details.component.html +++ b/packages/geo/src/lib/feature/feature-details/feature-details.component.html @@ -1,4 +1,4 @@ - +
diff --git a/packages/geo/src/lib/feature/feature-details/feature-details.component.ts b/packages/geo/src/lib/feature/feature-details/feature-details.component.ts index ddf293dbe8..4fa76555cb 100644 --- a/packages/geo/src/lib/feature/feature-details/feature-details.component.ts +++ b/packages/geo/src/lib/feature/feature-details/feature-details.component.ts @@ -38,16 +38,7 @@ export class FeatureDetailsComponent { @Input() map: IgoMap; - @Input() - get toolbox(): Toolbox { - return this._toolbox; - } - set toolbox(value: Toolbox) { - this._toolbox = value; - this.toolbox$.next(value); - } - private _toolbox: Toolbox; - public toolbox$ = new BehaviorSubject(undefined); + @Input() toolbox: Toolbox; @Input() get feature(): Feature { @@ -128,12 +119,8 @@ export class FeatureDetailsComponent { }); } - if (feature.properties && feature.properties.Route) { - this.toolbox$.subscribe((value) => { - if (value && !value.getTool('directions')) { - delete feature.properties.Route; - } - }); + if (feature.properties && feature.properties.Route && !this.toolbox.getTool('directions')) { + delete feature.properties.Route; } if (allowedFieldsAndAlias) {