style: improve SCADA analysis visibility

This commit is contained in:
2026-07-21 10:17:26 +08:00
parent 21791b9cee
commit caf06a8a82
3 changed files with 25 additions and 25 deletions
+12 -12
View File
@@ -21,10 +21,10 @@ export type ScadaAnalysisRenderResult = {
};
export const SCADA_ANALYSIS_LEVEL_COLORS: Record<ScadaAnalysisLevel, string> = {
high: "#DC2626",
high: "#F43F5E",
medium: "#F59E0B",
low: "#16A34A",
unrated: "#7C3AED"
low: "#10B981",
unrated: "#8B5CF6"
};
const SCADA_ANALYSIS_LABEL_COLORS: Record<ScadaAnalysisLevel, string> = {
@@ -67,10 +67,10 @@ export const scadaAnalysisLayers: Layer[] = [
type: "circle",
source: SCADA_ANALYSIS_SOURCE_ID,
paint: {
"circle-radius": 16,
"circle-radius": 20,
"circle-color": "rgba(255,255,255,0)",
"circle-stroke-color": "#FFFFFF",
"circle-stroke-width": 7
"circle-stroke-width": 8
}
},
{
@@ -78,10 +78,10 @@ export const scadaAnalysisLayers: Layer[] = [
type: "circle",
source: SCADA_ANALYSIS_SOURCE_ID,
paint: {
"circle-radius": 16,
"circle-radius": 20,
"circle-color": "rgba(255,255,255,0)",
"circle-stroke-color": levelColorExpression(SCADA_ANALYSIS_LEVEL_COLORS),
"circle-stroke-width": 4
"circle-stroke-width": 5
}
},
{
@@ -89,8 +89,8 @@ export const scadaAnalysisLayers: Layer[] = [
type: "circle",
source: SCADA_ANALYSIS_SOURCE_ID,
paint: {
"circle-radius": 5,
"circle-translate": [11, -11],
"circle-radius": 6,
"circle-translate": [14, -14],
"circle-color": levelColorExpression(SCADA_ANALYSIS_LEVEL_COLORS),
"circle-stroke-color": "#FFFFFF",
"circle-stroke-width": 2
@@ -103,10 +103,10 @@ export const scadaAnalysisLayers: Layer[] = [
layout: {
"symbol-sort-key": ["get", "sort_priority"],
"text-field": ["get", "analysis_label"],
"text-size": 15,
"text-size": 18,
"text-font": ["Noto Sans Regular"],
"text-letter-spacing": 0.015,
"text-offset": [0, -2.05],
"text-offset": [0, -2.2],
"text-anchor": "bottom",
"text-allow-overlap": false,
"text-ignore-placement": false
@@ -114,7 +114,7 @@ export const scadaAnalysisLayers: Layer[] = [
paint: {
"text-color": levelColorExpression(SCADA_ANALYSIS_LABEL_COLORS),
"text-halo-color": "#FFFFFF",
"text-halo-width": 3,
"text-halo-width": 4,
"text-halo-blur": 0.5
}
}