Mercurial > gemma
changeset 4234:fec07ba0fa60
client: implement styling for distance marks
* set default color values
* implement in ColorSetting component
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Wed, 21 Aug 2019 13:16:28 +0200 |
parents | 63b160379e06 |
children | 966d7eb6d99b |
files | client/src/components/systemconfiguration/ColorSettings.vue client/src/components/systemconfiguration/defaults.js |
diffstat | 2 files changed, 32 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/systemconfiguration/ColorSettings.vue Wed Aug 21 12:53:25 2019 +0200 +++ b/client/src/components/systemconfiguration/ColorSettings.vue Wed Aug 21 13:16:28 2019 +0200 @@ -134,6 +134,11 @@ strokeColor: initSColor }, { + name: "Distance Marks", + strokeColor: initSColor, + fillColor: initSColor + }, + { name: "Waterway profiles", strokeColor: initSColor } @@ -201,6 +206,10 @@ defaults.feature_colours_waterwayprofiles_stroke; break; } + case "Distance Marks": { + feature.strokeColor = defaults.feature_colours_distancemarks_stroke; + feature.fillColor = defaults.feature_colours_distancemarks_fill; + } } }, submit(feature) { @@ -326,6 +335,23 @@ } break; } + case "Distance Marks": { + if ( + strokeC !== this.config.distance_marks_stroke || + fillC !== this.config.distance_marks_fill + ) { + this.$store + .dispatch("application/saveConfig", { + distance_marks_stroke: + feature.strokeColor.hex || feature.strokeColor, + distance_marks_fill: feature.fillColor.hex || feature.fillColor + }) + .finally(() => this.$store.dispatch("application/loadConfig")); + } else { + noChangeMsg(feature.name); + } + break; + } } } }, @@ -342,7 +368,9 @@ this.features[4].fillColor = this.config.fairwaydimensionslos2_fill; this.features[5].strokeColor = this.config.fairwaydimensionslos3_stroke; this.features[5].fillColor = this.config.fairwaydimensionslos3_fill; - this.features[6].strokeColor = this.config.waterwayprofiles_stroke; + this.features[6].strokeColor = this.config.distance_marks_stroke; + this.features[6].fillColor = this.config.distance_marks_fill; + this.features[7].strokeColor = this.config.waterwayprofiles_stroke; } }; </script>
--- a/client/src/components/systemconfiguration/defaults.js Wed Aug 21 12:53:25 2019 +0200 +++ b/client/src/components/systemconfiguration/defaults.js Wed Aug 21 13:16:28 2019 +0200 @@ -24,5 +24,7 @@ feature_colours_fairwaydimensionslos2_fill: "#f0e6001a", feature_colours_fairwaydimensionslos3_stroke: "#0000ff", feature_colours_fairwaydimensionslos3_fill: "#ffffff66", - feature_colours_waterwayprofiles_stroke: "#0000ff80" + feature_colours_waterwayprofiles_stroke: "#0000ff80", + feature_colours_distancemarks_stroke: "#6666ff", + feature_colours_distancemarks_fill: "#ff9999" };