diff --git a/src/js/layer-manager/layer-group.js b/src/js/layer-manager/layer-group.js index 820cf9c1..e0393350 100644 --- a/src/js/layer-manager/layer-group.js +++ b/src/js/layer-manager/layer-group.js @@ -250,10 +250,12 @@ const addGray = (id) => { originalLayerColors[layer.id][`${layer.type}-color`] = value; if (value[0] == "step") { var greyStep = ["step"]; - for (let i = 2; i < greyStep.length; i+= 2) { + for (let i = 2; i < value.length; i+= 2) { greyStep.push(value[i - 1]); greyStep.push(convert(value[i])); } + console.log(value); + console.log(greyStep); Globals.map.setPaintProperty(layer.id, `${layer.type}-color`, greyStep) } else { Globals.map.setPaintProperty(layer.id, `${layer.type}-color`, convert(value)); @@ -345,4 +347,4 @@ export default { addVisibilityByID, addGray, addColor -}; \ No newline at end of file +};