diff --git a/projects/common-map/src/fm-map/effects/map.effects.ts b/projects/common-map/src/fm-map/effects/map.effects.ts index 01ca2bd..edf501e 100644 --- a/projects/common-map/src/fm-map/effects/map.effects.ts +++ b/projects/common-map/src/fm-map/effects/map.effects.ts @@ -154,14 +154,15 @@ export class MapEffects { @Effect() zoomToExtent2$: Observable = this.actions$.pipe( ofType(mapActions.SETFEATURES), - map((action: mapActions.SetFeatures) => { + switchMap((action: mapActions.SetFeatures) => { let extent = createEmpty(); - if (extent) { - for (let f of action.features) { - extend(extent, (f as Feature).getGeometry().getExtent()); - } - } - return new mapActions.SetExtent(extent); + if (extent) { + for (let f of action.features) { + extend(extent, (f as Feature).getGeometry().getExtent()); + } + if(action.features.length>0) return of(new mapActions.SetExtent(extent)); + } + return EMPTY; })); @Effect() diff --git a/projects/common/src/fm/components/app-menu/app-menu.component.html b/projects/common/src/fm/components/app-menu/app-menu.component.html index 950d683..be37a1f 100644 --- a/projects/common/src/fm/components/app-menu/app-menu.component.html +++ b/projects/common/src/fm/components/app-menu/app-menu.component.html @@ -1,8 +1,8 @@
- diff --git a/projects/common/src/fm/components/app-menu/app-menu.component.ts b/projects/common/src/fm/components/app-menu/app-menu.component.ts index 4df1e62..9c9a93a 100644 --- a/projects/common/src/fm/components/app-menu/app-menu.component.ts +++ b/projects/common/src/fm/components/app-menu/app-menu.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit, Input } from '@angular/core'; - import { IUser } from '../../models/user'; import {Store} from '@ngrx/store'; import * as appReducers from '../../reducers/app-common.reducer'; @@ -15,6 +14,7 @@ export class AppMenuComponent implements OnInit { @Input() user:IUser; @Input() showMenu:boolean; + public noContent: boolean = true; constructor(private store: Store) { } @@ -26,4 +26,12 @@ export class AppMenuComponent implements OnInit { this.store.dispatch(new appActions.ToggleAppMenu()); } + activateRoute() { + this.noContent=false; + } + + deActivateRoute() { + this.noContent=true; + } + } diff --git a/projects/common/src/fm/components/help-menu/help-menu.component.html b/projects/common/src/fm/components/help-menu/help-menu.component.html index c679e87..c485960 100644 --- a/projects/common/src/fm/components/help-menu/help-menu.component.html +++ b/projects/common/src/fm/components/help-menu/help-menu.component.html @@ -1,8 +1,8 @@
- \ No newline at end of file diff --git a/projects/common/src/fm/components/help-menu/help-menu.component.ts b/projects/common/src/fm/components/help-menu/help-menu.component.ts index f3ca928..aababd0 100644 --- a/projects/common/src/fm/components/help-menu/help-menu.component.ts +++ b/projects/common/src/fm/components/help-menu/help-menu.component.ts @@ -15,6 +15,7 @@ export class HelpMenuComponent implements OnInit { @Input() user:IUser; @Input() showMenu:boolean; + public noContent: boolean = true; constructor(private store: Store) { } @@ -25,4 +26,12 @@ export class HelpMenuComponent implements OnInit { event.stopPropagation(); this.store.dispatch(new appActions.ToggleHelpMenu()); } + + activateRoute() { + this.noContent=false; + } + + deActivateRoute() { + this.noContent=true; + } } diff --git a/projects/common/src/fm/components/notification-menu/notification-menu.component.html b/projects/common/src/fm/components/notification-menu/notification-menu.component.html index fab5e66..915c2cb 100644 --- a/projects/common/src/fm/components/notification-menu/notification-menu.component.html +++ b/projects/common/src/fm/components/notification-menu/notification-menu.component.html @@ -1,9 +1,9 @@
- diff --git a/projects/common/src/fm/components/notification-menu/notification-menu.component.ts b/projects/common/src/fm/components/notification-menu/notification-menu.component.ts index c1b2ace..aa9a518 100644 --- a/projects/common/src/fm/components/notification-menu/notification-menu.component.ts +++ b/projects/common/src/fm/components/notification-menu/notification-menu.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit, Input } from '@angular/core'; - import { IUser } from '../../models/user'; import {Store} from '@ngrx/store'; import * as appReducers from '../../reducers/app-common.reducer'; @@ -16,6 +15,7 @@ export class NotificationMenuComponent implements OnInit { @Input() unread:number; @Input() user:IUser; @Input() showMenu:boolean; + public noContent: boolean = true; constructor(private store: Store) { } @@ -27,4 +27,12 @@ export class NotificationMenuComponent implements OnInit { this.store.dispatch(new appActions.ToggleNotificationMenu()); } + activateRoute() { + this.noContent=false; + } + + deActivateRoute() { + this.noContent=true; + } + }