More refactoring
This commit is contained in:
@@ -181,9 +181,9 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
||||
let a = action as mapActions.SelectTemporalItemsSuccess;
|
||||
let selectedItemLayer=tassign(state.selectedItemLayer) as TemporalItemLayer;
|
||||
selectedItemLayer.temporalItems = a.temporalItems;
|
||||
selectedItemLayer.selectedItem = a.temporalItems.length>0?a.temporalItems[a.temporalItems.length-1]:null;
|
||||
selectedItemLayer.previousItem = a.temporalItems.length>1?a.temporalItems[a.temporalItems.length-2]:null;
|
||||
selectedItemLayer.nextItem = null;
|
||||
selectedItemLayer.selectedItemLayer = a.temporalItems.length>0?new ItemLayer(a.temporalItems[a.temporalItems.length-1]):null;
|
||||
selectedItemLayer.previousItemLayer = a.temporalItems.length>1?new ItemLayer(a.temporalItems[a.temporalItems.length-2]):null;
|
||||
selectedItemLayer.nextItemLayer = null;
|
||||
return tassign(state,{selectedItemLayer:tassign(state.selectedItemLayer,selectedItemLayer as ItemLayer)});
|
||||
}
|
||||
case mapActions.STARTSEARCH: {
|
||||
|
Reference in New Issue
Block a user