implement layer compare slider
This commit is contained in:
@@ -69,8 +69,9 @@ export interface State {
|
||||
replaceUrl:boolean,
|
||||
layerValuesX:number,
|
||||
layerValuesY:number,
|
||||
layerValuesEnabled:boolean;
|
||||
layerValues: Array<ILayervalue>;
|
||||
layerValuesEnabled:boolean,
|
||||
layerValues: Array<ILayervalue>
|
||||
showDataLayerSlide:boolean,
|
||||
}
|
||||
|
||||
export const initialState: State = {
|
||||
@@ -113,7 +114,8 @@ export const initialState: State = {
|
||||
layerValuesX:0,
|
||||
layerValuesY:0,
|
||||
layerValuesEnabled:false,
|
||||
layerValues:[]
|
||||
layerValues:[],
|
||||
showDataLayerSlide:false
|
||||
}
|
||||
|
||||
export function reducer(state = initialState, action: mapActions.Actions | commonActions.Actions | RouterNavigationAction): State {
|
||||
@@ -172,6 +174,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
||||
return tassign(state, {
|
||||
selectedItem: null,
|
||||
selectedItemLayer: null,
|
||||
showDataLayerSlide: false,
|
||||
features:[],
|
||||
inSearch:inSearch
|
||||
});
|
||||
@@ -501,7 +504,8 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
||||
features: [],
|
||||
query:initialState.query,
|
||||
showLayerSwitcher: false,
|
||||
extent: null
|
||||
extent: null,
|
||||
showDataLayerSlide: false
|
||||
});
|
||||
}
|
||||
case mapActions.SETSTYLE:{
|
||||
@@ -514,6 +518,9 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
||||
let a = action as mapActions.ShowLayerSwitcher;
|
||||
return tassign(state,{showLayerSwitcher:a.show});
|
||||
}
|
||||
case mapActions.TOGGLESHOWDATALAYERSLIDE:{
|
||||
return tassign(state,{showDataLayerSlide:!state.showDataLayerSlide});
|
||||
}
|
||||
case mapActions.SETREPLACEURL: {
|
||||
let a= action as mapActions.SetReplaceUrl;
|
||||
return tassign(state,{replaceUrl:a.replaceUrl});
|
||||
@@ -537,6 +544,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
||||
return tassign(state,{
|
||||
selectedItem: null,
|
||||
selectedItemLayer: null,
|
||||
showDataLayerSlide: false,
|
||||
features:[]
|
||||
});
|
||||
}
|
||||
@@ -584,6 +592,7 @@ export const getSelectedItemLayer = (state: State) => state.selectedItemLayer;
|
||||
export const getPeriod = (state:State) => state.period;
|
||||
export const getStyles = (state:State) => state.styles;
|
||||
export const getShowLayerSwitcher = (state:State) => state.showLayerSwitcher;
|
||||
export const getShowDataLayerSlide = (state:State) => state.showDataLayerSlide;
|
||||
export const getInSearch = (state:State) => state.inSearch;
|
||||
export const getState = (state:State) => {return {mapState:state.mapState,queryState:state.queryState,replaceUrl:state.replaceUrl};}
|
||||
export const getLayerValuesEnabled = (state:State) => state.layerValuesEnabled;
|
||||
@@ -616,6 +625,7 @@ export const selectGetSelectedItemLayer = createSelector(selectMapState, getSele
|
||||
export const selectGetPeriod = createSelector(selectMapState, getPeriod);
|
||||
export const selectGetStyles = createSelector(selectMapState, getStyles);
|
||||
export const selectGetShowLayerSwitcher = createSelector(selectMapState,getShowLayerSwitcher);
|
||||
export const selectGetShowdataLayerSlide = createSelector(selectMapState,getShowDataLayerSlide);
|
||||
export const selectGetInSearch = createSelector(selectMapState,getInSearch);
|
||||
export const selectGetState = createSelector(selectMapState,getState);
|
||||
export const selectGetLayerValuesEnabled = createSelector(selectMapState,getLayerValuesEnabled);
|
||||
|
Reference in New Issue
Block a user