Revert "AW-1079 Only add one item to overlay."
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This reverts commit 9c16681b58.
This commit is contained in:
Peter Bastiani 2020-03-26 13:28:36 +01:00
parent 9c16681b58
commit 8e0d302fd4

View File

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