comparison client/src/components/systemconfiguration/ColorSettings.vue @ 4206:cd267ed8371e stylesconfig

styles-config: deal with alpha values for colors
author Fadi Abbud <fadi.abbud@intevation.de>
date Wed, 14 Aug 2019 17:30:49 +0200
parents aee5b44f60a1
children ee79f8e25f61
comparison
equal deleted inserted replaced
4205:9285e94d1061 4206:cd267ed8371e
180 switch (feature.name) { 180 switch (feature.name) {
181 case "Bottlenecks": { 181 case "Bottlenecks": {
182 this.$store 182 this.$store
183 .dispatch("application/saveConfig", { 183 .dispatch("application/saveConfig", {
184 bottlenecks_stroke: 184 bottlenecks_stroke:
185 feature.strokeColor.hex || feature.strokeColor, 185 feature.strokeColor.hex8 || feature.strokeColor,
186 bottlenecks_fill: feature.fillColor.hex || feature.fillColor 186 bottlenecks_fill: feature.fillColor.hex8 || feature.fillColor
187 }) 187 })
188 .finally(() => this.$store.dispatch("application/loadConfig")); 188 .finally(() => this.$store.dispatch("application/loadConfig"));
189 break; 189 break;
190 } 190 }
191 191
192 case "Stretches": { 192 case "Stretches": {
193 this.$store 193 this.$store
194 .dispatch("application/saveConfig", { 194 .dispatch("application/saveConfig", {
195 stretches_stroke: feature.strokeColor.hex || feature.strokeColor, 195 stretches_stroke: feature.strokeColor.hex8 || feature.strokeColor,
196 stretches_fill: feature.fillColor.hex || feature.fillColor 196 stretches_fill: feature.fillColor.hex8 || feature.fillColor
197 }) 197 })
198 .finally(() => this.$store.dispatch("application/loadConfig")); 198 .finally(() => this.$store.dispatch("application/loadConfig"));
199 break; 199 break;
200 } 200 }
201 case "sections": { 201 case "Sections": {
202 this.$store 202 this.$store
203 .dispatch("application/saveConfig", { 203 .dispatch("application/saveConfig", {
204 stretches_stroke: feature.strokeColor.hex || feature.strokeColor, 204 stretches_stroke: feature.strokeColor.hex8 || feature.strokeColor,
205 stretches_fill: feature.fillColor.hex || feature.fillColor 205 stretches_fill: feature.fillColor.hex8 || feature.fillColor
206 }) 206 })
207 .finally(() => this.$store.dispatch("application/loadConfig")); 207 .finally(() => this.$store.dispatch("application/loadConfig"));
208 break; 208 break;
209 } 209 }
210 case "LOS_1": { 210 case "LOS_1": {
211 this.$store 211 this.$store
212 .dispatch("application/saveConfig", { 212 .dispatch("application/saveConfig", {
213 fairwaydimensionslos1_stroke: 213 fairwaydimensionslos1_stroke:
214 feature.strokeColor.hex || feature.strokeColor, 214 feature.strokeColor.hex8 || feature.strokeColor,
215 fairwaydimensionslos1_fill: 215 fairwaydimensionslos1_fill:
216 feature.fillColor.hex || feature.fillColor 216 feature.fillColor.hex8 || feature.fillColor
217 }) 217 })
218 .finally(() => this.$store.dispatch("application/loadConfig")); 218 .finally(() => this.$store.dispatch("application/loadConfig"));
219 break; 219 break;
220 } 220 }
221 case "LOS_2": { 221 case "LOS_2": {
222 this.$store 222 this.$store
223 .dispatch("application/saveConfig", { 223 .dispatch("application/saveConfig", {
224 fairwaydimensionslos2_stroke: 224 fairwaydimensionslos2_stroke:
225 feature.strokeColor.hex || feature.strokeColor, 225 feature.strokeColor.hex8 || feature.strokeColor,
226 fairwaydimensionslos2_fill: 226 fairwaydimensionslos2_fill:
227 feature.fillColor.hex || feature.fillColor 227 feature.fillColor.hex8 || feature.fillColor
228 }) 228 })
229 .finally(() => this.$store.dispatch("application/loadConfig")); 229 .finally(() => this.$store.dispatch("application/loadConfig"));
230 break; 230 break;
231 } 231 }
232 case "LOS_3": { 232 case "LOS_3": {
233 this.$store 233 this.$store
234 .dispatch("application/saveConfig", { 234 .dispatch("application/saveConfig", {
235 fairwaydimensionslos3_stroke: 235 fairwaydimensionslos3_stroke:
236 feature.strokeColor.hex || feature.strokeColor, 236 feature.strokeColor.hex8 || feature.strokeColor,
237 fairwaydimensionslos3_fill: 237 fairwaydimensionslos3_fill:
238 feature.fillColor.hex || feature.fillColor 238 feature.fillColor.hex8 || feature.fillColor
239 }) 239 })
240 .finally(() => this.$store.dispatch("application/loadConfig")); 240 .finally(() => this.$store.dispatch("application/loadConfig"));
241 break; 241 break;
242 } 242 }
243 case "Waterway profiles": { 243 case "Waterway profiles": {