Skip to content

Commit

Permalink
fix: layer style
Browse files Browse the repository at this point in the history
  • Loading branch information
majkshkurti committed Jul 3, 2024
1 parent 9324279 commit b8c4e8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/web/components/map/panels/style/LayerStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,16 @@ const LayerStylePanel = ({ projectId }: { projectId: string }) => {
collapsed={collapseStrokeColorOptions}
selectedField={activeLayer?.properties.stroke_color_field}
onStyleChange={async (newStyle: FeatureLayerProperties) => {
console.log(activeLayer);
if (
newStyle.stroke_color_field?.type === "number" &&
newStyle.color_scale !== "ordinal"
newStyle.stroke_color_scale !== "ordinal"
) {
await updateColorClassificationBreaks(
"stroke_color",
newStyle,
);
} else if (newStyle.color_scale === "ordinal") {
} else if (newStyle.stroke_color_scale === "ordinal") {
await updateOrdinalValues("stroke_color", newStyle);
}
updateLayerStyle(newStyle);
Expand Down

0 comments on commit b8c4e8c

Please sign in to comment.