Mercurial > gemma
changeset 4565:25898dabd4af iso-areas
Merged default into iso-areas branch.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 03 Oct 2019 20:59:41 +0200 |
parents | 6b107d4e6810 (current diff) d53c78cd53f3 (diff) |
children | 2c49a293f275 |
files | |
diffstat | 2 files changed, 28 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/identify/Identify.vue Thu Oct 03 19:51:53 2019 +0200 +++ b/client/src/components/identify/Identify.vue Thu Oct 03 20:59:41 2019 +0200 @@ -428,7 +428,7 @@ ], DANGER: [ this.$gettext("Avail: Latest measurement older than") + - ` ${latestInHours} d`, + ` ${latestInHours}h`, `(${lastMeasureDate})` ] };
--- a/client/src/components/map/Map.vue Thu Oct 03 19:51:53 2019 +0200 +++ b/client/src/components/map/Map.vue Thu Oct 03 20:59:41 2019 +0200 @@ -319,23 +319,37 @@ this.$store.dispatch("map/initIdentifyTool", this.map); }, loadStyles() { + const getRGBA = color => { + return ( + "rgba(" + + parseInt(color.slice(1, 3), 16) + + ", " + + parseInt(color.slice(3, 5), 16) + + ", " + + parseInt(color.slice(5, 7), 16) + + (color.length > 7 + ? ", " + parseInt(color.slice(7, 9), 16) / 255 + : "") + + ")" + ); + }; // load configured bottleneck colors HTTP.get("/system/settings", { headers: { "X-Gemma-Auth": localStorage.getItem("token") } }).then(response => { - let btlnStrokeC = response.data.bottlenecks_stroke, - btlnFillC = response.data.bottlenecks_fill, - strFillC = response.data.stretches_fill, - strStrokeC = response.data.stretches_stroke, - secStrokeC = response.data.sections_stroke, - secFillC = response.data.sections_fill, - fwd1StrokeC = response.data.fairwaydimensionslos1_stroke, - fwd1FillC = response.data.fairwaydimensionslos1_fill, - fwd2StrokeC = response.data.fairwaydimensionslos2_stroke, - fwd2FillC = response.data.fairwaydimensionslos2_fill, - fwd3StrokeC = response.data.fairwaydimensionslos3_stroke, - fwd3FillC = response.data.fairwaydimensionslos3_fill, - wwpStokeC = response.data.waterwayprofiles_stroke; + let btlnStrokeC = getRGBA(response.data.bottlenecks_stroke), + btlnFillC = getRGBA(response.data.bottlenecks_fill), + strFillC = getRGBA(response.data.stretches_fill), + strStrokeC = getRGBA(response.data.stretches_stroke), + secStrokeC = getRGBA(response.data.sections_stroke), + secFillC = getRGBA(response.data.sections_fill), + fwd1StrokeC = getRGBA(response.data.fairwaydimensionslos1_stroke), + fwd1FillC = getRGBA(response.data.fairwaydimensionslos1_fill), + fwd2StrokeC = getRGBA(response.data.fairwaydimensionslos2_stroke), + fwd2FillC = getRGBA(response.data.fairwaydimensionslos2_fill), + fwd3StrokeC = getRGBA(response.data.fairwaydimensionslos3_stroke), + fwd3FillC = getRGBA(response.data.fairwaydimensionslos3_fill), + wwpStokeC = getRGBA(response.data.waterwayprofiles_stroke); let btlnStyle = new Style({ stroke: new Stroke({ color: btlnStrokeC,