Mercurial > gemma
diff client/src/components/map/Map.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 | be34d02cff73 |
children | 9264d6405b4d |
line wrap: on
line diff
--- a/client/src/components/map/Map.vue Wed Aug 14 17:24:58 2019 +0200 +++ b/client/src/components/map/Map.vue Wed Aug 14 17:30:49 2019 +0200 @@ -271,32 +271,25 @@ ); } // load configured bottleneck colors - HTTP.get("/system/style/Bottlenecks/stroke", { + HTTP.get("/system/settings", { headers: { "X-Gemma-Auth": localStorage.getItem("token") } }) .then(response => { - let btlnStrokeC = response.data.code; - HTTP.get("/system/style/Bottlenecks/fill", { - headers: { "X-Gemma-Auth": localStorage.getItem("token") } - }) - .then(response => { - let btlnFillC = response.data.code; - var newStyle = new Style({ - stroke: new Stroke({ - color: btlnStrokeC, - width: 4 - }), - fill: new Fill({ - color: btlnFillC - }) - }); - this.layers.get("BOTTLENECKS").setStyle(newStyle); - this.$store.commit("gauges/deleteNashSutcliffeCache"); - this.$store.dispatch("map/refreshLayers"); + let btlnStrokeC = response.data.bottlenecks_stroke; + let btlnFillC = response.data.bottlenecks_fill; + console.log("aa"); + var newStyle = new Style({ + stroke: new Stroke({ + color: btlnStrokeC, + width: 4 + }), + fill: new Fill({ + color: btlnFillC }) - .catch(error => { - console.log(error); - }); + }); + this.layers.get("BOTTLENECKS").setStyle(newStyle); + this.$store.commit("gauges/deleteNashSutcliffeCache"); + this.$store.dispatch("map/refreshLayers"); }) .catch(error => { console.log(error);