Mercurial > gemma
comparison client/src/components/systemconfiguration/MorphologyClassbreaks.vue @ 3867:d37f44c4d531
client: configuration: moved default values to separate file
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 09 Jul 2019 16:11:42 +0200 |
parents | 704f853b9c37 |
children | 851c0ccba59b |
comparison
equal
deleted
inserted
replaced
3866:42cd1978b504 | 3867:d37f44c4d531 |
---|---|
256 * Author(s): | 256 * Author(s): |
257 * Markus Kottländer <markus@intevation.de> | 257 * Markus Kottländer <markus@intevation.de> |
258 */ | 258 */ |
259 import { mapState } from "vuex"; | 259 import { mapState } from "vuex"; |
260 import { Chrome } from "vue-color"; | 260 import { Chrome } from "vue-color"; |
261 | 261 import defaults from "./defaults"; |
262 const DEFAULT_CLASSBREAKS = | |
263 "1:#ff00dd,1.5,1.7,1.9,2.1,2.3,2.5:#f25f20,2.7,2.9,3.1:#f7e40e,3.3,3.5,4:#8ad51a,4.5,5,5.5,6,6.5,7:#1414ff"; | |
264 const DEFAULT_CLASSBREAKS_COMPARE = | |
265 "-2:#06b100,-1.9,-1.8,-1.7,-1.6,-1.5,-1.4,-1.3,-1.2,-1.1,-1:#1cc68e,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,0:#c2c2c2,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1:#fff01a,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2:#f80012"; | |
266 | 262 |
267 export default { | 263 export default { |
268 components: { | 264 components: { |
269 "chrome-picker": Chrome | 265 "chrome-picker": Chrome |
270 }, | 266 }, |
313 }) | 309 }) |
314 .finally(() => this.$store.dispatch("application/loadConfig")); | 310 .finally(() => this.$store.dispatch("application/loadConfig")); |
315 }, | 311 }, |
316 resetClassbreaks() { | 312 resetClassbreaks() { |
317 this.morphologyClassbreaks = this.parseClassbreakString( | 313 this.morphologyClassbreaks = this.parseClassbreakString( |
318 DEFAULT_CLASSBREAKS | 314 defaults.morphology_classbreaks |
319 ); | 315 ); |
320 }, | 316 }, |
321 resetClassbreaksCompare() { | 317 resetClassbreaksCompare() { |
322 this.morphologyClassbreaksCompare = this.parseClassbreakString( | 318 this.morphologyClassbreaksCompare = this.parseClassbreakString( |
323 DEFAULT_CLASSBREAKS_COMPARE | 319 defaults.morphology_classbreaks_compare |
324 ); | 320 ); |
325 }, | 321 }, |
326 parseClassbreakString(str) { | 322 parseClassbreakString(str) { |
327 return str | 323 return str |
328 .split(",") | 324 .split(",") |