AW-1079 Only add one item to overlay.
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
parent
d883553934
commit
9c16681b58
@ -316,6 +316,7 @@ 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 });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user