diff --git a/projects/common-map/package.json b/projects/common-map/package.json index 1051958..931ab89 100644 --- a/projects/common-map/package.json +++ b/projects/common-map/package.json @@ -15,6 +15,6 @@ "@ngrx/router-store": "^8.2", "@ngrx/store": "^8.2", "tassign": "^1.0.0", - "@farmmaps/common": ">=0.0.1-prerelease.102 <0.0.1" + "@farmmaps/common": ">=0.0.1-prerelease.109 <0.0.1" } } diff --git a/projects/common-map/src/fm-map/actions/map.actions.ts b/projects/common-map/src/fm-map/actions/map.actions.ts index ce963ca..fb4b0ab 100644 --- a/projects/common-map/src/fm-map/actions/map.actions.ts +++ b/projects/common-map/src/fm-map/actions/map.actions.ts @@ -1,243 +1,235 @@ -import { Action } from '@ngrx/store'; - -import { IMapState } from '../models/map.state'; -import { IItemLayer } from '../models/item.layer'; -import { IQueryState } from '../models/query.state'; -import { IItem } from '@farmmaps/common'; -import { Feature } from 'ol'; -import { Extent } from 'ol/extent'; - -export const SETSTATE = '[Map] SetState'; -export const SETMAPSTATE = '[Map] MapState'; -export const SETVIEWEXTENT = '[Map] SetViewExtent'; -export const INIT = '[Map] Init'; -export const SETPARENT = '[Map] SetParent'; -export const STARTSEARCH = '[Map] StartSearch'; -export const STARTSEARCHSUCCESS = '[Map] StartSearchSuccess'; -export const SELECTFEATURE = '[Map] SelectFeature'; -export const SELECTITEM = '[Map] SelectItem'; -export const SELECTITEMSUCCESS = '[Map] SelectItemSuccess'; -export const ADDFEATURESUCCESS = '[Map] AddFeatureSuccess'; -export const UPDATEFEATURESUCCESS = '[Map] UpdateFeatureSuccess'; -export const EXPANDSEARCH = '[Map] ExpandSearch'; -export const COLLAPSESEARCH = '[Map] CollapseSearch'; -export const TOGGLEMENU = '[Map] ToggleMenu'; -export const SETEXTENT = '[Map] SetExtent'; -export const SETQUERYSTATE = '[Map] SetQueryState'; -export const SETTIMESPAN = '[Map] SetTimeSpan'; -export const ADDLAYER = '[Map] AddLayer'; -export const SETVISIBILITY = '[Map] SetVisibility'; -export const SETOPACITY = '[Map] SetOpacity'; -export const SETLAYERINDEX = '[Map] SetLayerIndex'; -export const REMOVELAYER = '[Map] RemoveLayer'; -export const LOADBASELAYERS = '[Map] LoadLayers'; -export const LOADBASELAYERSSUCCESS = '[Map] LoadLayersSuccess'; -export const SELECTBASELAYER = '[Map] SelectBaseLayers'; -export const SELECTOVERLAYLAYER = '[Map] SelectOverlayLayers'; -export const ZOOMTOEXTENT = '[Map] ZoomToExtent'; -export const DOQUERY = '[Map] DoQuery'; - -export class SetState implements Action { - readonly type = SETSTATE; - - constructor(public mapState: IMapState,public queryState:IQueryState) { } -} - -export class SetMapState implements Action { - readonly type = SETMAPSTATE; - - constructor(public mapState: IMapState) { } -} - -export class SetViewExtent implements Action { - readonly type = SETVIEWEXTENT; - - constructor(public extent:number[]) { } -} - -export class Init implements Action { - readonly type = INIT; - - constructor() { } -} - -export class SetParent implements Action { - readonly type = SETPARENT; - - constructor(public parentCode:string) { } -} - -export class StartSearch implements Action { - readonly type = STARTSEARCH; - - constructor(public queryState: IQueryState) { } -} - -export class StartSearchSuccess implements Action { - readonly type = STARTSEARCHSUCCESS; - - constructor(public features: Array, public query:IQueryState) { } -} - -export class SelectFeature implements Action { - readonly type = SELECTFEATURE; - - constructor(public feature:Feature) { } -} - -export class SelectItem implements Action { - readonly type = SELECTITEM; - - constructor(public itemCode:string) { } -} - -export class SelectItemSuccess implements Action { - readonly type = SELECTITEMSUCCESS; - - constructor(public item: IItem) { } -} - -export class AddFeatureSuccess implements Action { - readonly type = ADDFEATURESUCCESS; - - constructor(public feature: Feature) { } -} - -export class UpdateFeatureSuccess implements Action { - readonly type = UPDATEFEATURESUCCESS; - - constructor(public feature: Feature) { } -} - -export class ExpandSearch implements Action { - readonly type = EXPANDSEARCH; - - constructor() { } -} - -export class CollapseSearch implements Action { - readonly type = COLLAPSESEARCH; - - constructor() { } -} - -export class ToggleMenu implements Action { - readonly type = TOGGLEMENU; - - constructor() { } -} - -export class SetExtent implements Action { - readonly type = SETEXTENT; - - constructor(public extent:number[]) { } -} - -export class SetQueryState implements Action { - readonly type = SETQUERYSTATE; - - constructor(public queryState: IQueryState) { } -} - -export class SetTimeSpan implements Action { - readonly type = SETTIMESPAN; - - constructor(public startDate: Date, public endDate: Date) { } -} - -export class AddLayer implements Action { - readonly type = ADDLAYER; - - constructor(public item:IItem,public layerIndex=-1) { } -} - -export class SetVisibility implements Action { - readonly type = SETVISIBILITY; - - constructor(public itemLayer:IItemLayer,public visibility:boolean) { } -} - -export class SetOpacity implements Action { - readonly type = SETOPACITY; - - constructor(public itemLayer: IItemLayer, public opacity: number) { } -} - -export class SetLayerIndex implements Action { - readonly type = SETLAYERINDEX; - - constructor(public layerIndex: number, public itemLayer: IItemLayer = null) { } -} - -export class RemoveLayer implements Action { - readonly type = REMOVELAYER; - - constructor(public itemLayer: IItemLayer) { } -} - -export class LoadBaseLayers implements Action { - readonly type = LOADBASELAYERS; - - constructor(public projection: string) { } -} - -export class LoadBaseLayersSuccess implements Action { - readonly type = LOADBASELAYERSSUCCESS; - - constructor(public items: IItem[] ) { } -} - -export class SelectBaseLayer implements Action { - readonly type = SELECTBASELAYER; - - constructor(public itemLayer: IItemLayer) { } -} - -export class SelectOverlayLayer implements Action { - readonly type = SELECTOVERLAYLAYER; - - constructor(public itemLayer: IItemLayer) { } -} - -export class ZoomToExtent implements Action { - readonly type = ZOOMTOEXTENT; - - constructor(public itemLayer: IItemLayer) { } -} - -export class DoQuery implements Action { - readonly type = DOQUERY; - - constructor(public query:IQueryState) { } -} - -export type Actions = SetMapState - | Init - | SetParent - | StartSearch - | StartSearchSuccess - | SelectFeature - | SelectItem - | SelectItemSuccess - | AddFeatureSuccess - | UpdateFeatureSuccess - | ExpandSearch - | CollapseSearch - | ToggleMenu - | SetExtent - | SetQueryState - | SetTimeSpan - | AddLayer - | RemoveLayer - | SetVisibility - | SetOpacity - | SetLayerIndex - | LoadBaseLayers - | LoadBaseLayersSuccess - | SelectBaseLayer - | SelectOverlayLayer - | ZoomToExtent - | SetState - | SetViewExtent - | DoQuery; - +import { Action } from '@ngrx/store'; + +import { IMapState } from '../models/map.state'; +import { IItemLayer } from '../models/item.layer'; +import { IQueryState } from '../models/query.state'; +import { IItem } from '@farmmaps/common'; +import { Feature } from 'ol'; +import { Extent } from 'ol/extent'; + +export const SETSTATE = '[Map] SetState'; +export const SETMAPSTATE = '[Map] MapState'; +export const SETVIEWEXTENT = '[Map] SetViewExtent'; +export const INIT = '[Map] Init'; +export const SETPARENT = '[Map] SetParent'; +export const STARTSEARCH = '[Map] StartSearch'; +export const STARTSEARCHSUCCESS = '[Map] StartSearchSuccess'; +export const SELECTFEATURE = '[Map] SelectFeature'; +export const SELECTITEM = '[Map] SelectItem'; +export const SELECTITEMSUCCESS = '[Map] SelectItemSuccess'; +export const ADDFEATURESUCCESS = '[Map] AddFeatureSuccess'; +export const UPDATEFEATURESUCCESS = '[Map] UpdateFeatureSuccess'; +export const EXPANDSEARCH = '[Map] ExpandSearch'; +export const COLLAPSESEARCH = '[Map] CollapseSearch'; +export const SETEXTENT = '[Map] SetExtent'; +export const SETQUERYSTATE = '[Map] SetQueryState'; +export const SETTIMESPAN = '[Map] SetTimeSpan'; +export const ADDLAYER = '[Map] AddLayer'; +export const SETVISIBILITY = '[Map] SetVisibility'; +export const SETOPACITY = '[Map] SetOpacity'; +export const SETLAYERINDEX = '[Map] SetLayerIndex'; +export const REMOVELAYER = '[Map] RemoveLayer'; +export const LOADBASELAYERS = '[Map] LoadLayers'; +export const LOADBASELAYERSSUCCESS = '[Map] LoadLayersSuccess'; +export const SELECTBASELAYER = '[Map] SelectBaseLayers'; +export const SELECTOVERLAYLAYER = '[Map] SelectOverlayLayers'; +export const ZOOMTOEXTENT = '[Map] ZoomToExtent'; +export const DOQUERY = '[Map] DoQuery'; + +export class SetState implements Action { + readonly type = SETSTATE; + + constructor(public mapState: IMapState,public queryState:IQueryState) { } +} + +export class SetMapState implements Action { + readonly type = SETMAPSTATE; + + constructor(public mapState: IMapState) { } +} + +export class SetViewExtent implements Action { + readonly type = SETVIEWEXTENT; + + constructor(public extent:number[]) { } +} + +export class Init implements Action { + readonly type = INIT; + + constructor() { } +} + +export class SetParent implements Action { + readonly type = SETPARENT; + + constructor(public parentCode:string) { } +} + +export class StartSearch implements Action { + readonly type = STARTSEARCH; + + constructor(public queryState: IQueryState) { } +} + +export class StartSearchSuccess implements Action { + readonly type = STARTSEARCHSUCCESS; + + constructor(public features: Array, public query:IQueryState) { } +} + +export class SelectFeature implements Action { + readonly type = SELECTFEATURE; + + constructor(public feature:Feature) { } +} + +export class SelectItem implements Action { + readonly type = SELECTITEM; + + constructor(public itemCode:string) { } +} + +export class SelectItemSuccess implements Action { + readonly type = SELECTITEMSUCCESS; + + constructor(public item: IItem) { } +} + +export class AddFeatureSuccess implements Action { + readonly type = ADDFEATURESUCCESS; + + constructor(public feature: Feature) { } +} + +export class UpdateFeatureSuccess implements Action { + readonly type = UPDATEFEATURESUCCESS; + + constructor(public feature: Feature) { } +} + +export class ExpandSearch implements Action { + readonly type = EXPANDSEARCH; + + constructor() { } +} + +export class CollapseSearch implements Action { + readonly type = COLLAPSESEARCH; + + constructor() { } +} + +export class SetExtent implements Action { + readonly type = SETEXTENT; + + constructor(public extent:number[]) { } +} + +export class SetQueryState implements Action { + readonly type = SETQUERYSTATE; + + constructor(public queryState: IQueryState) { } +} + +export class SetTimeSpan implements Action { + readonly type = SETTIMESPAN; + + constructor(public startDate: Date, public endDate: Date) { } +} + +export class AddLayer implements Action { + readonly type = ADDLAYER; + + constructor(public item:IItem,public layerIndex=-1) { } +} + +export class SetVisibility implements Action { + readonly type = SETVISIBILITY; + + constructor(public itemLayer:IItemLayer,public visibility:boolean) { } +} + +export class SetOpacity implements Action { + readonly type = SETOPACITY; + + constructor(public itemLayer: IItemLayer, public opacity: number) { } +} + +export class SetLayerIndex implements Action { + readonly type = SETLAYERINDEX; + + constructor(public layerIndex: number, public itemLayer: IItemLayer = null) { } +} + +export class RemoveLayer implements Action { + readonly type = REMOVELAYER; + + constructor(public itemLayer: IItemLayer) { } +} + +export class LoadBaseLayers implements Action { + readonly type = LOADBASELAYERS; + + constructor(public projection: string) { } +} + +export class LoadBaseLayersSuccess implements Action { + readonly type = LOADBASELAYERSSUCCESS; + + constructor(public items: IItem[] ) { } +} + +export class SelectBaseLayer implements Action { + readonly type = SELECTBASELAYER; + + constructor(public itemLayer: IItemLayer) { } +} + +export class SelectOverlayLayer implements Action { + readonly type = SELECTOVERLAYLAYER; + + constructor(public itemLayer: IItemLayer) { } +} + +export class ZoomToExtent implements Action { + readonly type = ZOOMTOEXTENT; + + constructor(public itemLayer: IItemLayer) { } +} + +export class DoQuery implements Action { + readonly type = DOQUERY; + + constructor(public query:IQueryState) { } +} + +export type Actions = SetMapState + | Init + | SetParent + | StartSearch + | StartSearchSuccess + | SelectFeature + | SelectItem + | SelectItemSuccess + | AddFeatureSuccess + | UpdateFeatureSuccess + | ExpandSearch + | CollapseSearch + | SetExtent + | SetQueryState + | SetTimeSpan + | AddLayer + | RemoveLayer + | SetVisibility + | SetOpacity + | SetLayerIndex + | LoadBaseLayers + | LoadBaseLayersSuccess + | SelectBaseLayer + | SelectOverlayLayer + | ZoomToExtent + | SetState + | SetViewExtent + | DoQuery; + diff --git a/projects/common-map/src/fm-map/common-map-routing.module.ts b/projects/common-map/src/fm-map/common-map-routing.module.ts index 752818e..0e4b723 100644 --- a/projects/common-map/src/fm-map/common-map-routing.module.ts +++ b/projects/common-map/src/fm-map/common-map-routing.module.ts @@ -1,29 +1,29 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { MapComponent } from './components/map/map.component'; -import { AuthGuard } from '@farmmaps/common'; - -const routes = [ - { - path: '', canActivateChild: [AuthGuard], children: [ - { - path: '', - component: MapComponent - } - ] - }, - { - path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState', canActivateChild: [AuthGuard], children: [ - { - path: '', - component: MapComponent - } - ] - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class MapRoutingModule { } +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { MapComponent } from './components/map/map.component'; +import { AuthGuard } from '@farmmaps/common'; + +const routes = [ + { + path: '', canActivateChild: [AuthGuard], children: [ + { + path: '', + component: MapComponent + } + ] + }, + { + path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState', canActivateChild: [AuthGuard], children: [ + { + path: '', + component: MapComponent + } + ] + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class MapRoutingModule { } diff --git a/projects/common-map/src/fm-map/components/map/map.component.html b/projects/common-map/src/fm-map/components/map/map.component.html index 2b1aad5..fa08752 100644 --- a/projects/common-map/src/fm-map/components/map/map.component.html +++ b/projects/common-map/src/fm-map/components/map/map.component.html @@ -13,7 +13,6 @@ searchMinified:searchMinified$|async, selectedItem:selectedItem$|async, queryState:queryState$|async, - menuVisible:menuVisible$|async, searchCollapsed:searchCollapsed$|async, clearEnabled:clearEnabled$|async, period:period$|async, @@ -64,19 +63,6 @@ - -
-
-
- -
-
-
- -
-
-
-
diff --git a/projects/common-map/src/fm-map/components/map/map.component.scss b/projects/common-map/src/fm-map/components/map/map.component.scss index 6697306..4997c8a 100644 --- a/projects/common-map/src/fm-map/components/map/map.component.scss +++ b/projects/common-map/src/fm-map/components/map/map.component.scss @@ -1,171 +1,167 @@ -@import "../../_theme.scss"; -@import "~bootstrap/scss/bootstrap.scss"; - -aol-map { position:absolute;width:100%;height:100%;} - -.arrow { - top: 3rem; -} - -.popover { - max-height:22rem; - min-width:15rem; -} - -.popover-body { - max-height:19rem; - overflow:hidden; - overflow-y:auto; -} - -.card-title { - font-size:1rem; -} - -.menu-card { - margin-left:-7px; - padding-left:7px; - margin-right:-7px; - padding-right:7px; - margin-bottom:7px; -} - -.icon-top { - font-size: 6rem; - text-align: center; - height: 9.75rem; -} - -.icon-top i { - padding-top: 1.875rem; -} - -.card-title { - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; -} - - -.control-container { - position: absolute; - right: 1em; - bottom: 1em; -} - -switch2d3d { - position: absolute; - right: 1em; - bottom: 1em; -} - -.panel-wrapper { - display: flex; - flex-direction: column; - align-items: stretch; - width: 100%; - height: 100%; -} - -.panel-top { - display: block; - height:0; -} - -.panel-bottom { - overflow:auto; - flex:1; -} - -.no-results { - font-weight:bold; -} - -.no-results > span { - font-style:italic; -} - -div.header { - display:flex; - padding-top:1em; - margin-bottom:1em; -} - -div.header button { - margin-left:1em; -} - -.logo { - overflow: hidden; - max-height: 2.5em; -} - -timespan { - position: absolute; - transition: left 0.5s; - bottom: 0; - left: 0; - right: 0; - background-color: rgba(255, 255, 255, 0.5); -} - -timespan.menuVisible { - left: 22rem; -} - -:host ::ng-deep .timespan div.clearfix { - transition: height 0.5s; -} - -:host ::ng-deep .menu .side-panel { - z-index: 100; - background-color: rgb(245,245,245); -} - -@media screen and (min-width:44rem) { - .panel-top { - height: 8.1rem; - } -} - -.map { - transition: margin-left 0.3s; -} - -.shortcut-icon { - display: inline-block; - text-align: center; - margin: 0.5rem; - cursor:pointer; -} - -.shortcut-icon > .icon { - width: 3rem; - height: 3rem; - background-color: #731e64; - display: inline-block; - text-align: center; - line-height: 3rem; - color: #ffffff; - font-size: 2rem; -} - -.shortcut-icon > .caption { - text-align: center; - width: 4rem; - overflow: hidden; - text-overflow: ellipsis; - color: theme-color(); -} - -.shortcut-icon > .farm-icon { - background-color: #731E64; -} - -.shortcut-icon > .trijntje-icon { - background-color: #FAA33F; -} - -/*.panel-visible { - margin-left:22rem; -}*/ +@import "../../_theme.scss"; +@import "~bootstrap/scss/bootstrap.scss"; + +aol-map { position:absolute;width:100%;height:100%;} + +.arrow { + top: 3rem; +} + +.popover { + max-height:22rem; + min-width:15rem; +} + +.popover-body { + max-height:19rem; + overflow:hidden; + overflow-y:auto; +} + +.card-title { + font-size:1rem; +} + +.menu-card { + margin-left:-7px; + padding-left:7px; + margin-right:-7px; + padding-right:7px; + margin-bottom:7px; +} + +.icon-top { + font-size: 6rem; + text-align: center; + height: 9.75rem; +} + +.icon-top i { + padding-top: 1.875rem; +} + +.card-title { + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; +} + + +.control-container { + position: absolute; + right: 1em; + bottom: 1em; +} + +switch2d3d { + position: absolute; + right: 1em; + bottom: 1em; +} + +.panel-wrapper { + display: flex; + flex-direction: column; + align-items: stretch; + width: 100%; + height: 100%; +} + +.panel-top { + display: block; + height:0; +} + +.panel-bottom { + overflow:auto; + flex:1; +} + +.no-results { + font-weight:bold; +} + +.no-results > span { + font-style:italic; +} + +div.header { + display:flex; + padding-top:1em; + margin-bottom:1em; +} + +div.header button { + margin-left:1em; +} + +.logo { + overflow: hidden; + max-height: 2.5em; +} + +timespan { + position: absolute; + transition: left 0.5s; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255, 255, 255, 0.5); +} + +timespan.menuVisible { + left: 22rem; +} + +:host ::ng-deep .timespan div.clearfix { + transition: height 0.5s; +} + + +@media screen and (min-width:44rem) { + .panel-top { + height: 8.1rem; + } +} + +.map { + transition: margin-left 0.3s; +} + +.shortcut-icon { + display: inline-block; + text-align: center; + margin: 0.5rem; + cursor:pointer; +} + +.shortcut-icon > .icon { + width: 3rem; + height: 3rem; + background-color: #731e64; + display: inline-block; + text-align: center; + line-height: 3rem; + color: #ffffff; + font-size: 2rem; +} + +.shortcut-icon > .caption { + text-align: center; + width: 4rem; + overflow: hidden; + text-overflow: ellipsis; + color: theme-color(); +} + +.shortcut-icon > .farm-icon { + background-color: #731E64; +} + +.shortcut-icon > .trijntje-icon { + background-color: #FAA33F; +} + +/*.panel-visible { + margin-left:22rem; +}*/ diff --git a/projects/common-map/src/fm-map/components/map/map.component.ts b/projects/common-map/src/fm-map/components/map/map.component.ts index 7de5ad3..c90b02e 100644 --- a/projects/common-map/src/fm-map/components/map/map.component.ts +++ b/projects/common-map/src/fm-map/components/map/map.component.ts @@ -138,7 +138,6 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit { this.clearEnabled$ = this.store.select(mapReducers.selectGetClearEnabled); this.searchCollapsed$ = this.store.select(mapReducers.selectGetSearchCollapsed); this.searchMinified$ = this.store.select(mapReducers.selectGetSearchMinified); - this.menuVisible$ = this.store.select(mapReducers.selectGetMenuVisible); this.openedModalName$ = this.store.select(commonReducers.selectOpenedModalName); this.query$ = this.store.select(mapReducers.selectGetQuery); this.extent$ = this.store.select(mapReducers.selectGetExtent); @@ -213,7 +212,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit { } handleToggleMenu(event) { - this.store.dispatch(new mapActions.ToggleMenu()); + this.store.dispatch(new commonActions.ToggleMenu()); } handleToggleBaseLayers(event:MouseEvent) { 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 b5643e6..cf35add 100644 --- a/projects/common-map/src/fm-map/effects/map.effects.ts +++ b/projects/common-map/src/fm-map/effects/map.effects.ts @@ -104,7 +104,7 @@ export class MapEffects { ofType(mapActions.STARTSEARCHSUCCESS), mergeMap((action: mapActions.StartSearchSuccess) => { if (action.query.bboxFilter) { - return []; + return [new commonActions.SetMenuVisible(false)]; } else { var extent = createEmpty(); @@ -114,7 +114,7 @@ export class MapEffects { } } //return []; - return of(new mapActions.SetExtent(extent)); + return [new mapActions.SetExtent(extent),new commonActions.SetMenuVisible(false)]; } })); diff --git a/projects/common-map/src/fm-map/reducers/map.reducer.ts b/projects/common-map/src/fm-map/reducers/map.reducer.ts index 228ee9c..9374631 100644 --- a/projects/common-map/src/fm-map/reducers/map.reducer.ts +++ b/projects/common-map/src/fm-map/reducers/map.reducer.ts @@ -44,8 +44,7 @@ export interface State { selectedItem:IItem, clearEnabled: boolean, searchCollapsed: boolean, - searchMinified: boolean, - menuVisible: boolean, + searchMinified: boolean, extent: number[], baseLayers: Array overlayLayers: Array, @@ -79,7 +78,6 @@ export const initialState: State = { clearEnabled: false, searchCollapsed: true, searchMinified:false, - menuVisible: true, extent: null, baseLayers: [], overlayLayers: [], @@ -165,8 +163,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo selectedItemLayer:null, queryState: tassign(a.queryState), searchCollapsed: false, - searchMinified: true, - menuVisible:false + searchMinified: true }); } case mapActions.DOQUERY: { @@ -181,7 +178,6 @@ export function reducer(state = initialState, action: mapActions.Actions | commo return tassign(state, { panelVisible: true, selectedFeature: a.feature, - menuVisible: false, extent: a.feature.getGeometry().getExtent(), searchCollapsed: false, clearEnabled:true, @@ -207,9 +203,6 @@ export function reducer(state = initialState, action: mapActions.Actions | commo case mapActions.COLLAPSESEARCH: { return tassign(state, { searchCollapsed: state.panelVisible ? false: true}); } - case mapActions.TOGGLEMENU: { - return tassign(state, { menuVisible: !state.menuVisible }); - } case mapActions.SETEXTENT: { let a = action as mapActions.SetExtent; return tassign(state, { extent: a.extent }); @@ -310,7 +303,6 @@ export function reducer(state = initialState, action: mapActions.Actions | commo clearEnabled: false, searchCollapsed: true, searchMinified: false, - menuVisible:false, features: [], query:initialState.query }); @@ -335,7 +327,6 @@ export const getQueryState = (state: State) => state.queryState; export const getClearEnabled = (state: State) => state.clearEnabled; export const getSearchCollapsed = (state: State) => state.searchCollapsed; export const getSearchMinified = (state: State) => state.searchMinified; -export const getMenuVisible = (state: State) => state.menuVisible; export const getExtent = (state: State) => state.extent; export const getOverlayLayers = (state: State) => state.overlayLayers; export const getBaseLayers = (state: State) => state.baseLayers; @@ -358,7 +349,6 @@ export const selectGetQueryState = createSelector(selectMapState, getQueryState) export const selectGetClearEnabled = createSelector(selectMapState, getClearEnabled); export const selectGetSearchCollapsed = createSelector(selectMapState, getSearchCollapsed); export const selectGetSearchMinified = createSelector(selectMapState, getSearchMinified); -export const selectGetMenuVisible = createSelector(selectMapState, getMenuVisible); export const selectGetExtent = createSelector(selectMapState, getExtent); export const selectGetOverlayLayers = createSelector(selectMapState, getOverlayLayers); export const selectGetBaseLayers = createSelector(selectMapState, getBaseLayers);