changeset 4264:edfafea4b7b0

styles-config: hide alpha color picker for some layers * hide alpha color picker in the color box when it is not provided for the layer.
author Fadi Abbud <fadi.abbud@intevation.de>
date Tue, 27 Aug 2019 10:56:32 +0200
parents f9c620cf0dd3
children 2596a028dc3a
files client/src/components/systemconfiguration/ColorSettings.vue
diffstat 1 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/systemconfiguration/ColorSettings.vue	Tue Aug 27 09:09:17 2019 +0200
+++ b/client/src/components/systemconfiguration/ColorSettings.vue	Tue Aug 27 10:56:32 2019 +0200
@@ -10,7 +10,10 @@
               >
             </div>
             <div class="card-body p-0">
-              <chrome-picker v-model="f.fillColor" />
+              <chrome-picker
+                v-model="f.fillColor"
+                :class="{ hide: f.noOpacity }"
+              />
             </div>
           </div>
           <div class="mt-3">
@@ -21,7 +24,10 @@
                 >
               </div>
               <div class="card-body p-0">
-                <chrome-picker v-model="f.strokeColor" />
+                <chrome-picker
+                  v-model="f.strokeColor"
+                  :class="{ hide: f.noOpacity }"
+                />
               </div>
             </div>
           </div>
@@ -68,6 +74,11 @@
       .vc-chrome-saturation-wrap
         border-radius: 0
         padding-bottom: 45%
+      &.hide
+        .vc-chrome-alpha-wrap
+          display: none !important
+        .vc-chrome-hue-wrap
+          margin-top: 10px
 </style>
 
 <script>
@@ -133,12 +144,14 @@
         {
           name: "Distance Marks, Axis",
           strokeColor: initSColor,
-          fillColor: initSColor
+          fillColor: initSColor,
+          noOpacity: true
         },
         {
           name: "Distance Marks",
           strokeColor: initSColor,
-          fillColor: initSColor
+          fillColor: initSColor,
+          noOpacity: true
         },
         {
           name: "Waterway profiles",
@@ -146,11 +159,13 @@
         },
         {
           name: "Waterway Axis",
-          strokeColor: initSColor
+          strokeColor: initSColor,
+          noOpacity: true
         },
         {
           name: "Waterway Area",
-          strokeColor: initSColor
+          strokeColor: initSColor,
+          noOpacity: true
         }
       ]
     };