changeset 4524:7cca4aa9a04a

Client: Map: improve rgba() values calculation for styling * set value of 1 in rgba() when the hex value does not contain opacity values(in case opacity=1)
author Fadi Abbud <fadi.abbud@intevation.de>
date Mon, 07 Oct 2019 13:30:55 +0200
parents cb1f62335b00
children 9887061df57b
files client/src/components/map/Map.vue
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/map/Map.vue	Mon Oct 07 12:12:06 2019 +0200
+++ b/client/src/components/map/Map.vue	Mon Oct 07 13:30:55 2019 +0200
@@ -327,9 +327,8 @@
           parseInt(color.slice(3, 5), 16) +
           ", " +
           parseInt(color.slice(5, 7), 16) +
-          (color.length > 7
-            ? ", " + parseInt(color.slice(7, 9), 16) / 255
-            : "") +
+          ", " +
+          (color.length > 7 ? parseInt(color.slice(7, 9), 16) / 255 : "1") +
           ")"
         );
       };