AW-1079 Only add one item to overlay.
FarmMaps.Develop/FarmMapsLib/develop This commit looks good Details

feature/MinimizeSolution
Peter Bastiani 2020-03-26 10:38:39 +01:00
parent d883553934
commit 9c16681b58
1 changed files with 1 additions and 0 deletions

View File

@ -316,6 +316,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
let itemLayers = state.overlayLayers.slice(0);
let itemLayer = new ItemLayer(a.item);
itemLayer.layerIndex = a.layerIndex == -1 ? 0 : a.layerIndex;
itemLayers = itemLayers.filter(item => item.layerIndex !== itemLayer.layerIndex);
itemLayers.push(itemLayer);
return tassign(state, { overlayLayers: itemLayers, selectedOverlayLayer: itemLayer });
}