Compare commits
2 Commits
d44531274b
...
b5b84c2547
| Author | SHA1 | Date | |
|---|---|---|---|
| b5b84c2547 | |||
| c2b016b2b9 |
@@ -302,7 +302,7 @@ export class SetReplaceUrl implements Action {
|
||||
export class SetFeatures implements Action {
|
||||
readonly type = SETFEATURES;
|
||||
|
||||
constructor(public features: Array<Feature<Geometry>>) { }
|
||||
constructor(public features: Array<Feature<Geometry>>, public zoomToExtent: boolean = true) { }
|
||||
}
|
||||
|
||||
export class SetLayerValuesLocation implements Action {
|
||||
|
||||
@@ -166,6 +166,7 @@ export class MapEffects {
|
||||
zoomToExtent2$ = createEffect(() => this.actions$.pipe(
|
||||
ofType(mapActions.SETFEATURES),
|
||||
switchMap((action: mapActions.SetFeatures) => {
|
||||
if (action.zoomToExtent) {
|
||||
const extent = createEmpty();
|
||||
if (extent) {
|
||||
for (const f of action.features) {
|
||||
@@ -173,6 +174,7 @@ export class MapEffects {
|
||||
}
|
||||
if (action.features.length > 0) return of(new mapActions.SetExtent(extent));
|
||||
}
|
||||
}
|
||||
return EMPTY;
|
||||
})));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user