Skip to content

Commit

Permalink
fix(layer-switcher): vector b&w
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Jan 11, 2024
1 parent 4d225c6 commit 180ecf3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/js/layer-manager/layer-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -345,4 +347,4 @@ export default {
addVisibilityByID,
addGray,
addColor
};
};

0 comments on commit 180ecf3

Please sign in to comment.