AW-7096 Fix

This commit is contained in:
2025-11-13 13:43:44 +01:00
parent c52ee36d1b
commit c2b016b2b9
2 changed files with 8 additions and 6 deletions

View File

@@ -302,7 +302,7 @@ export class SetReplaceUrl implements Action {
export class SetFeatures implements Action { export class SetFeatures implements Action {
readonly type = SETFEATURES; readonly type = SETFEATURES;
constructor(public features: Array<Feature<Geometry>>) { } constructor(public features: Array<Feature<Geometry>>, public zoomToExtent: boolean = true) { }
} }
export class SetLayerValuesLocation implements Action { export class SetLayerValuesLocation implements Action {

View File

@@ -166,6 +166,7 @@ export class MapEffects {
zoomToExtent2$ = createEffect(() => this.actions$.pipe( zoomToExtent2$ = createEffect(() => this.actions$.pipe(
ofType(mapActions.SETFEATURES), ofType(mapActions.SETFEATURES),
switchMap((action: mapActions.SetFeatures) => { switchMap((action: mapActions.SetFeatures) => {
if (action.zoomToExtent) {
const extent = createEmpty(); const extent = createEmpty();
if (extent) { if (extent) {
for (const f of action.features) { for (const f of action.features) {
@@ -173,6 +174,7 @@ export class MapEffects {
} }
if (action.features.length > 0) return of(new mapActions.SetExtent(extent)); if (action.features.length > 0) return of(new mapActions.SetExtent(extent));
} }
}
return EMPTY; return EMPTY;
}))); })));