comparison client/src/components/identify/Identify.vue @ 4266:fbe2f1aa2757

styles: refactor color coding accuracy colors
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 27 Aug 2019 14:22:45 +0200
parents 2596a028dc3a
children c5642480eb9b
comparison
equal deleted inserted replaced
4265:2596a028dc3a 4266:fbe2f1aa2757
159 import { formatter } from "./formatter"; 159 import { formatter } from "./formatter";
160 import { getCenter } from "ol/extent"; 160 import { getCenter } from "ol/extent";
161 import classifications from "../../lib/classifications"; 161 import classifications from "../../lib/classifications";
162 import { styleFactory } from "@/components/map/styles"; 162 import { styleFactory } from "@/components/map/styles";
163 163
164 const colorCodes = styleFactory().colorCodes; 164 const { currencyColorCodes } = styleFactory();
165 165
166 export default { 166 export default {
167 name: "identify", 167 name: "identify",
168 computed: { 168 computed: {
169 ...mapGetters("application", ["versionStr"]), 169 ...mapGetters("application", ["versionStr"]),
189 this.$gettext("Data too old. Treshold: ") + `(${revisitingFactor})` 189 this.$gettext("Data too old. Treshold: ") + `(${revisitingFactor})`
190 }; 190 };
191 return messagesPerState[classifications.surveyCurrency(feature)]; 191 return messagesPerState[classifications.surveyCurrency(feature)];
192 }, 192 },
193 currencyColor(feature) { 193 currencyColor(feature) {
194 return colorCodes[classifications.surveyCurrency(feature)]; 194 return currencyColorCodes[classifications.surveyCurrency(feature)];
195 }, 195 },
196 showBottleneckMeta(feature) { 196 showBottleneckMeta(feature) {
197 const result = /bottleneck/.test(feature.getId().toLowerCase()); 197 const result = /bottleneck/.test(feature.getId().toLowerCase());
198 return result; 198 return result;
199 }, 199 },