Mercurial > gemma
annotate client/src/components/systemconfiguration/ColorSettings.vue @ 5356:3216b4a19023 extented-report
spinner added to info tool's download link for DQL reports
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 22 Jun 2021 14:44:34 +0200 |
parents | b5290f4a35f4 |
children | 84d01a536bec |
rev | line source |
---|---|
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
1 <template> |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
2 <div class="d-flex flex-column py-3"> |
3597
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
3 <div class="px-3 container-fluid"> |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
4 <div class="row"> |
4414
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
5 <div v-for="f in features" :key="f.key" class="col-sm-3 mt-2 mb-4"> |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
6 <div v-if="f.fillColor" class="card mt-3"> |
4200
5cee71c929d1
style-config: improve layout
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4199
diff
changeset
|
7 <div class="card-header small text-center"> |
4229
912b8aa42c31
clinet: improve strings-marking for translations (ColorSettings.vue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4213
diff
changeset
|
8 <span v-translate="{ layerName: f.name }" |
912b8aa42c31
clinet: improve strings-marking for translations (ColorSettings.vue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4213
diff
changeset
|
9 >%{layerName} Fill Color</span |
912b8aa42c31
clinet: improve strings-marking for translations (ColorSettings.vue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4213
diff
changeset
|
10 > |
4200
5cee71c929d1
style-config: improve layout
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4199
diff
changeset
|
11 </div> |
5cee71c929d1
style-config: improve layout
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4199
diff
changeset
|
12 <div class="card-body p-0"> |
4264
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
13 <chrome-picker |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
14 v-model="f.fillColor" |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
15 :class="{ hide: f.noOpacity }" |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
16 /> |
3597
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
17 </div> |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
18 </div> |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
19 <div class="mt-3"> |
4199
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
20 <div v-if="f.strokeColor" class="card"> |
4200
5cee71c929d1
style-config: improve layout
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4199
diff
changeset
|
21 <div class="card-header small text-center"> |
4229
912b8aa42c31
clinet: improve strings-marking for translations (ColorSettings.vue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4213
diff
changeset
|
22 <span v-translate="{ layerName: f.name }" |
912b8aa42c31
clinet: improve strings-marking for translations (ColorSettings.vue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4213
diff
changeset
|
23 >%{layerName} Border Color</span |
912b8aa42c31
clinet: improve strings-marking for translations (ColorSettings.vue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4213
diff
changeset
|
24 > |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
25 </div> |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
26 <div class="card-body p-0"> |
4264
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
27 <chrome-picker |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
28 v-model="f.strokeColor" |
4320
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
29 :class="{ |
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
30 hide: |
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
31 f.noOpacity || |
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
32 f.name === 'Distance Marks' || |
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
33 f.name === 'Distance Marks, Axis' |
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
34 }" |
4264
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
35 /> |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
36 </div> |
3597
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
37 </div> |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
38 </div> |
4414
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
39 <div class="d-flex text-right mt-2 mb-4"> |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
40 <a |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
41 @click.prevent="submit(f)" |
4414
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
42 class="w-50 btn btn-info btn-sm text-white" |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
43 > |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
44 <translate>Send</translate> |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
45 </a> |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
46 <a |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
47 @click.prevent="reset(f)" |
4414
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
48 class="w-50 btn btn-outline-info btn-sm ml-2" |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
49 > |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
50 <translate>Reset to defaults</translate> |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
51 </a> |
3597
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
52 </div> |
4414
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
53 <hr /> |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
54 </div> |
4414
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
55 <div class="d-flex col-sm-3 align-self-end text-right savebuttons"> |
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
56 <a @click.prevent="resetAll" class="w-50 btn btn-outline-info btn-sm" |
4250
3181ae3f9f84
client: unify layout of buttons and mark strings for translations(ColorSetting)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4240
diff
changeset
|
57 ><translate>Reset all to defaults</translate> |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
58 </a> |
4250
3181ae3f9f84
client: unify layout of buttons and mark strings for translations(ColorSetting)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4240
diff
changeset
|
59 <a |
3181ae3f9f84
client: unify layout of buttons and mark strings for translations(ColorSetting)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4240
diff
changeset
|
60 @click.prevent="saveAll" |
4414
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
61 class="w-50 btn btn-info ml-1 btn-sm text-white " |
4250
3181ae3f9f84
client: unify layout of buttons and mark strings for translations(ColorSetting)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4240
diff
changeset
|
62 ><translate>Send all</translate> |
3181ae3f9f84
client: unify layout of buttons and mark strings for translations(ColorSetting)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4240
diff
changeset
|
63 </a> |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
64 </div> |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
65 </div> |
3597
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
66 </div> |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
67 </div> |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
68 </template> |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
69 |
3593
e7726cc3bc56
client: configuration: used same color picker for all color settings and adjusted its style
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
70 <style lang="sass" scoped> |
4414
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
71 .savebuttons |
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
72 position:relative |
b5290f4a35f4
color_settings: improving layout breaks of color settings with bigger boxes
Thomas Junk <thomas.junk@intevation.de>
parents:
4333
diff
changeset
|
73 top: -4em; |
3597
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
74 /deep/ |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
75 .card |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
76 overflow: hidden |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
77 .card-header |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
78 padding: .25rem 1rem |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
79 .vc-chrome |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
80 box-shadow: none |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
81 border-radius: 0 |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
82 width: 100% |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
83 .vc-chrome-saturation-wrap |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
84 border-radius: 0 |
d1bbfb9635ca
client: configuration: unified styles of different config components
Markus Kottlaender <markus@intevation.de>
parents:
3595
diff
changeset
|
85 padding-bottom: 45% |
4264
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
86 &.hide |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
87 .vc-chrome-alpha-wrap |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
88 display: none !important |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
89 .vc-chrome-hue-wrap |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
90 margin-top: 10px |
3593
e7726cc3bc56
client: configuration: used same color picker for all color settings and adjusted its style
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
91 </style> |
e7726cc3bc56
client: configuration: used same color picker for all color settings and adjusted its style
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
92 |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
93 <script> |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
94 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
95 * without warranty, see README.md and license for details. |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
96 * |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
97 * SPDX-License-Identifier: AGPL-3.0-or-later |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
98 * License-Filename: LICENSES/AGPL-3.0.txt |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
99 * |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
100 * Copyright (C) 2018 by via donau |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
101 * – Österreichische Wasserstraßen-Gesellschaft mbH |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
102 * Software engineering by Intevation GmbH |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
103 * |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
104 * Author(s): |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
105 * Markus Kottländer <markus@intevation.de> |
4254
f1f1395f141b
client: correct authors for Colorsettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4250
diff
changeset
|
106 * Fadi Abbud <fadi.abbud@intevation.de> |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
107 */ |
2920
c1f2b9148cc8
client: removed more unnecessary closing tags and opzimized imports
Markus Kottlaender <markus@intevation.de>
parents:
2276
diff
changeset
|
108 import { Chrome, Compact } from "vue-color"; |
3871
6c2ef463b958
client: configuration: make color settings resettable
Markus Kottlaender <markus@intevation.de>
parents:
3601
diff
changeset
|
109 import defaults from "./defaults"; |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
110 import { mapState } from "vuex"; |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
111 import { displayInfo } from "@/lib/errors"; |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
112 |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
113 const initSColor = "#000000", |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
114 initFColor = "#000000"; |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
115 |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
116 export default { |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
117 name: "colorsettings", |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
118 data() { |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
119 return { |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
120 sent: false, |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
121 currentConfig: null, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
122 features: [ |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
123 { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
124 name: "Bottlenecks", |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
125 fillColor: initSColor, |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
126 strokeColor: initSColor |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
127 }, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
128 { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
129 name: "Stretches", |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
130 fillColor: initFColor, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
131 strokeColor: initSColor |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
132 }, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
133 { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
134 name: "Sections", |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
135 fillColor: initFColor, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
136 strokeColor: initSColor |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
137 }, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
138 { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
139 name: "LOS_1", |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
140 fillColor: initFColor, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
141 strokeColor: initSColor |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
142 }, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
143 { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
144 name: "LOS_2", |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
145 fillColor: initFColor, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
146 strokeColor: initSColor |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
147 }, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
148 { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
149 name: "LOS_3", |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
150 fillColor: initFColor, |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
151 strokeColor: initSColor |
4199
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
152 }, |
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
153 { |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
154 name: "Distance Marks, Axis", |
4234
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
155 strokeColor: initSColor, |
4320
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
156 fillColor: initSColor |
4234
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
157 }, |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
158 { |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
159 name: "Distance Marks", |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
160 strokeColor: initSColor, |
4320
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
161 fillColor: initSColor |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
162 }, |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
163 { |
4199
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
164 name: "Waterway profiles", |
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
165 strokeColor: initSColor |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
166 }, |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
167 { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
168 name: "Waterway Axis", |
4264
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
169 strokeColor: initSColor, |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
170 noOpacity: true |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
171 }, |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
172 { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
173 name: "Waterway Area", |
4264
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
174 strokeColor: initSColor, |
edfafea4b7b0
styles-config: hide alpha color picker for some layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4262
diff
changeset
|
175 noOpacity: true |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
176 } |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
177 ] |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
178 }; |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
179 }, |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
180 computed: { |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
181 ...mapState("application", ["config"]) |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
182 }, |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
183 components: { |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
184 "chrome-picker": Chrome, |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
185 "compact-picker": Compact |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
186 }, |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
187 methods: { |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
188 saveAll() { |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
189 this.features.forEach(f => { |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
190 this.submit(f); |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
191 }); |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
192 }, |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
193 resetAll() { |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
194 this.features.forEach(f => { |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
195 this.reset(f); |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
196 }); |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
197 }, |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
198 reset(feature) { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
199 switch (feature.name) { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
200 case "Bottlenecks": { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
201 feature.strokeColor = defaults.feature_colours_bottlenecks_stroke; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
202 feature.fillColor = defaults.feature_colours_bottlenecks_fill; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
203 break; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
204 } |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
205 case "Stretches": { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
206 feature.strokeColor = defaults.feature_colours_stretches_stroke; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
207 feature.fillColor = defaults.feature_colours_stretches_fill; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
208 break; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
209 } |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
210 case "Sections": { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
211 feature.strokeColor = defaults.feature_colours_sections_stroke; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
212 feature.fillColor = defaults.feature_colours_sections_fill; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
213 break; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
214 } |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
215 case "LOS_1": { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
216 feature.strokeColor = |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
217 defaults.feature_colours_fairwaydimensionslos1_stroke; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
218 feature.fillColor = |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
219 defaults.feature_colours_fairwaydimensionslos1_fill; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
220 break; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
221 } |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
222 case "LOS_2": { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
223 feature.strokeColor = |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
224 defaults.feature_colours_fairwaydimensionslos2_stroke; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
225 feature.fillColor = |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
226 defaults.feature_colours_fairwaydimensionslos2_fill; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
227 break; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
228 } |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
229 case "LOS_3": { |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
230 feature.strokeColor = |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
231 defaults.feature_colours_fairwaydimensionslos3_stroke; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
232 feature.fillColor = |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
233 defaults.feature_colours_fairwaydimensionslos3_fill; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
234 break; |
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
235 } |
4199
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
236 case "Waterway profiles": { |
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
237 feature.strokeColor = |
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
238 defaults.feature_colours_waterwayprofiles_stroke; |
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
239 break; |
8509d80b85a1
style-config: implement waterway profiles style-field
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4198
diff
changeset
|
240 } |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
241 case "Waterway Axis": { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
242 feature.strokeColor = defaults.feature_colours_waterway_axis_stroke; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
243 break; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
244 } |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
245 case "Waterway Area": { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
246 feature.strokeColor = defaults.feature_colours_waterway_area_stroke; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
247 break; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
248 } |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
249 case "Distance Marks, Axis": { |
4234
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
250 feature.strokeColor = defaults.feature_colours_distancemarks_stroke; |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
251 feature.fillColor = defaults.feature_colours_distancemarks_fill; |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
252 break; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
253 } |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
254 case "Distance Marks": { |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
255 feature.strokeColor = |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
256 defaults.feature_colours_distancemarks_ashore_stroke; |
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
257 feature.fillColor = |
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
258 defaults.feature_colours_distancemarks_ashore_fill; |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
259 break; |
4234
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
260 } |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
261 } |
3871
6c2ef463b958
client: configuration: make color settings resettable
Markus Kottlaender <markus@intevation.de>
parents:
3601
diff
changeset
|
262 }, |
4198
e3210c87f497
client: implement basis layer-styles configurations
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3889
diff
changeset
|
263 submit(feature) { |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
264 let strokeC = feature.strokeColor.hex8 || feature.strokeColor, |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
265 fillC = feature.fillColor |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
266 ? feature.fillColor.hex8 || feature.fillColor |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
267 : initFColor; |
4320
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
268 let strokeCForWMS = feature.strokeColor.hex || feature.strokeColor; |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
269 let noChangeMsg = name => { |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
270 displayInfo({ |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
271 title: name + ":", |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
272 message: this.$gettext("No style-changes") |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
273 }); |
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
274 }; |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
275 switch (feature.name) { |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
276 case "Bottlenecks": { |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
277 // send values only if they changed |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
278 if ( |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
279 strokeC !== this.config.bottlenecks_stroke || |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
280 fillC !== this.config.bottlenecks_fill |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
281 ) { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
282 this.$store |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
283 .dispatch("application/saveConfig", { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
284 bottlenecks_stroke: strokeC, |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
285 bottlenecks_fill: fillC |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
286 }) |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
287 .finally(() => this.$store.dispatch("application/loadConfig")); |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
288 } else { |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
289 noChangeMsg(feature.name); |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
290 } |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
291 break; |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
292 } |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
293 case "Stretches": { |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
294 if ( |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
295 strokeC !== this.config.stretches_stroke || |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
296 fillC !== this.config.stretches_fill |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
297 ) { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
298 this.$store |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
299 .dispatch("application/saveConfig", { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
300 stretches_stroke: strokeC, |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
301 stretches_fill: fillC |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
302 }) |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
303 .finally(() => this.$store.dispatch("application/loadConfig")); |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
304 } else { |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
305 noChangeMsg(feature.name); |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
306 } |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
307 break; |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
308 } |
4206
cd267ed8371e
styles-config: deal with alpha values for colors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4204
diff
changeset
|
309 case "Sections": { |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
310 if ( |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
311 strokeC !== this.config.sections_stroke || |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
312 fillC !== this.config.sections_fill |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
313 ) { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
314 this.$store |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
315 .dispatch("application/saveConfig", { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
316 sections_stroke: strokeC, |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
317 sections_fill: fillC |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
318 }) |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
319 .finally(() => this.$store.dispatch("application/loadConfig")); |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
320 } else { |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
321 noChangeMsg(feature.name); |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
322 } |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
323 break; |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
324 } |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
325 case "LOS_1": { |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
326 if ( |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
327 strokeC !== this.config.fairwaydimensionslos1_stroke || |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
328 fillC !== this.config.fairwaydimensionslos1_fill |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
329 ) { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
330 this.$store |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
331 .dispatch("application/saveConfig", { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
332 fairwaydimensionslos1_stroke: strokeC, |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
333 fairwaydimensionslos1_fill: fillC |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
334 }) |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
335 .finally(() => this.$store.dispatch("application/loadConfig")); |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
336 } else { |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
337 noChangeMsg(feature.name); |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
338 } |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
339 break; |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
340 } |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
341 case "LOS_2": { |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
342 if ( |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
343 strokeC !== this.config.fairwaydimensionslos2_stroke || |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
344 fillC !== this.config.fairwaydimensionslos2_fill |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
345 ) { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
346 this.$store |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
347 .dispatch("application/saveConfig", { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
348 fairwaydimensionslos2_stroke: strokeC, |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
349 fairwaydimensionslos2_fill: fillC |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
350 }) |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
351 .finally(() => this.$store.dispatch("application/loadConfig")); |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
352 } else { |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
353 noChangeMsg(feature.name); |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
354 } |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
355 break; |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
356 } |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
357 case "LOS_3": { |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
358 if ( |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
359 strokeC !== this.config.fairwaydimensionslos3_stroke || |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
360 fillC !== this.config.fairwaydimensionslos3_fill |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
361 ) { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
362 this.$store |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
363 .dispatch("application/saveConfig", { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
364 fairwaydimensionslos3_stroke: strokeC, |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
365 fairwaydimensionslos3_fill: fillC |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
366 }) |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
367 .finally(() => this.$store.dispatch("application/loadConfig")); |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
368 } else { |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
369 noChangeMsg(feature.name); |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
370 } |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
371 break; |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
372 } |
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
373 case "Waterway profiles": { |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
374 if (strokeC !== this.config.waterwayprofiles_stroke) { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
375 this.$store |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
376 .dispatch("application/saveConfig", { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
377 waterwayprofiles_stroke: strokeC |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
378 }) |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
379 .finally(() => { |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
380 this.$store.dispatch("application/loadConfig"); |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
381 }); |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
382 } else { |
4213
36ee7e621133
styles-config: impelement rest-send buttons for all style changes
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4211
diff
changeset
|
383 noChangeMsg(feature.name); |
4211
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
384 } |
d08247127c21
styles-config: improve code for ColorSettings component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4208
diff
changeset
|
385 break; |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
386 } |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
387 case "Waterway Axis": { |
4262
45802eac155b
styles-config: fix sending of values to backend for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4254
diff
changeset
|
388 if (strokeCForWMS !== this.config.waterway_axis_stroke) { |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
389 this.$store |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
390 .dispatch("application/saveConfig", { |
4262
45802eac155b
styles-config: fix sending of values to backend for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4254
diff
changeset
|
391 waterway_axis_stroke: strokeCForWMS |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
392 }) |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
393 .finally(() => { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
394 this.$store.dispatch("application/loadConfig"); |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
395 }); |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
396 } else { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
397 noChangeMsg(feature.name); |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
398 } |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
399 break; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
400 } |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
401 case "Waterway Area": { |
4262
45802eac155b
styles-config: fix sending of values to backend for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4254
diff
changeset
|
402 if (strokeCForWMS !== this.config.waterway_area_stroke) { |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
403 this.$store |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
404 .dispatch("application/saveConfig", { |
4262
45802eac155b
styles-config: fix sending of values to backend for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4254
diff
changeset
|
405 waterway_area_stroke: strokeCForWMS |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
406 }) |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
407 .finally(() => { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
408 this.$store.dispatch("application/loadConfig"); |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
409 }); |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
410 } else { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
411 noChangeMsg(feature.name); |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
412 } |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
413 break; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
414 } |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
415 case "Distance Marks, Axis": { |
4234
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
416 if ( |
4262
45802eac155b
styles-config: fix sending of values to backend for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4254
diff
changeset
|
417 strokeCForWMS !== this.config.distance_marks_stroke || |
4320
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
418 fillC !== this.config.distance_marks_fill |
4234
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
419 ) { |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
420 this.$store |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
421 .dispatch("application/saveConfig", { |
4262
45802eac155b
styles-config: fix sending of values to backend for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4254
diff
changeset
|
422 distance_marks_stroke: strokeCForWMS, |
4320
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
423 distance_marks_fill: fillC |
4234
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
424 }) |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
425 .finally(() => this.$store.dispatch("application/loadConfig")); |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
426 } else { |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
427 noChangeMsg(feature.name); |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
428 } |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
429 break; |
fec07ba0fa60
client: implement styling for distance marks
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4229
diff
changeset
|
430 } |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
431 case "Distance Marks": { |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
432 if ( |
4262
45802eac155b
styles-config: fix sending of values to backend for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4254
diff
changeset
|
433 strokeCForWMS !== this.config.distance_marks_ashore_stroke || |
4320
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
434 fillC !== this.config.distance_marks_ashore_fill |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
435 ) { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
436 this.$store |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
437 .dispatch("application/saveConfig", { |
4262
45802eac155b
styles-config: fix sending of values to backend for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4254
diff
changeset
|
438 distance_marks_ashore_stroke: strokeCForWMS, |
4320
baa3759f27f4
client: opacity for WMS-Layers
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4264
diff
changeset
|
439 distance_marks_ashore_fill: fillC |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
440 }) |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
441 .finally(() => this.$store.dispatch("application/loadConfig")); |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
442 } else { |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
443 noChangeMsg(feature.name); |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
444 } |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
445 break; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
446 } |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
447 } |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
448 } |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
449 }, |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
450 mounted() { |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
451 this.features[0].strokeColor = this.config.bottlenecks_stroke || initSColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
452 this.features[0].fillColor = this.config.bottlenecks_fill || initFColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
453 this.features[1].strokeColor = this.config.stretches_stroke || initSColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
454 this.features[1].fillColor = this.config.stretches_fill || initFColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
455 this.features[2].strokeColor = this.config.sections_stroke || initSColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
456 this.features[2].fillColor = this.config.sections_fill || initFColor; |
4204
aee5b44f60a1
styles-config: refactor http requests for all layers in ColorSetting.vue component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4200
diff
changeset
|
457 this.features[3].strokeColor = this.config.fairwaydimensionslos1_stroke; |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
458 this.features[3].fillColor = |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
459 this.config.fairwaydimensionslos1_fill || initFColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
460 this.features[4].strokeColor = |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
461 this.config.fairwaydimensionslos2_stroke || initSColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
462 this.features[4].fillColor = |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
463 this.config.fairwaydimensionslos2_fill || initFColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
464 this.features[5].strokeColor = |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
465 this.config.fairwaydimensionslos3_stroke || initSColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
466 this.features[5].fillColor = |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
467 this.config.fairwaydimensionslos3_fill || initFColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
468 this.features[6].strokeColor = |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
469 this.config.distance_marks_stroke || initSColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
470 this.features[6].fillColor = this.config.distance_marks_fill || initFColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
471 this.features[7].strokeColor = |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
472 this.config.distance_marks_ashore_stroke || initSColor; |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
473 this.features[7].fillColor = |
4240
a4f76e170290
styles-config: adjust names of layers in ColorSetting component
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4238
diff
changeset
|
474 this.config.distance_marks_ashore_fill || initFColor; |
4238
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
475 this.features[8].strokeColor = this.config.waterwayprofiles_stroke; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
476 this.features[9].strokeColor = |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
477 this.config.waterway_axis_stroke || initSColor; |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
478 this.features[10].strokeColor = |
fe24cdde614d
styles-config: prepare components for WMS-Layer styling and set default color values
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4234
diff
changeset
|
479 this.config.waterway_area_stroke || initSColor; |
2276
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
480 } |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
481 }; |
920fba6eef0d
moved color settings into own component
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
482 </script> |