Mercurial > gemma
changeset 4401:9842812b92e0
identify: fix numbers for nsc
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 16 Sep 2019 16:46:29 +0200 |
parents | 3b36c4d810b0 |
children | 5e894e680e0d |
files | client/src/components/identify/Identify.vue client/src/components/layers/Layers.vue |
diffstat | 2 files changed, 24 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/identify/Identify.vue Mon Sep 16 16:41:56 2019 +0200 +++ b/client/src/components/identify/Identify.vue Mon Sep 16 16:46:29 2019 +0200 @@ -5,7 +5,7 @@ { expanded: showIdentify } ]" > - <div style="width: 18rem"> + <div style="width: 20rem"> <UIBoxHeader icon="info" :title="identifiedLabel" @@ -262,10 +262,18 @@ return forecastVsRealityColorCodes[this.gaugeStatus]; }, gaugeStatusText() { - const nsc24 = this.config.gm_forecast_vs_reality_nsc_24h; - const nsc72 = this.config.gm_forecast_vs_reality_nsc_72h; - const coeffWarn = this.gaugeCoeffs ? this.gaugeCoeffs[2].value : ""; - const coeffDanger = this.gaugeCoeffs ? this.gaugeCoeffs[0].value : ""; + const nsc24 = Number(this.config.gm_forecast_vs_reality_nsc_24h).toFixed( + 2 + ); + const nsc72 = Number(this.config.gm_forecast_vs_reality_nsc_72h).toFixed( + 2 + ); + const coeffWarn = this.gaugeCoeffs + ? Number(this.gaugeCoeffs[2].value).toFixed(2) + : ""; + const coeffDanger = this.gaugeCoeffs + ? Number(this.gaugeCoeffs[0].value).toFixed(2) + : ""; const messagesPerState = { OK: this.$gettext("Nash-Sutcliffe") + @@ -283,11 +291,17 @@ return forecastVsRealityColorCodes[this.refGaugeStatus]; }, refGaugeStatusText() { - const nsc24 = this.config.gm_forecast_vs_reality_nsc_24h; - const nsc72 = this.config.gm_forecast_vs_reality_nsc_72h; - const coeffWarn = this.refGaugeCoeffs ? this.refGaugeCoeffs[2].value : ""; + const nsc24 = Number(this.config.gm_forecast_vs_reality_nsc_24h).toFixed( + 2 + ); + const nsc72 = Number(this.config.gm_forecast_vs_reality_nsc_72h).toFixed( + 2 + ); + const coeffWarn = this.refGaugeCoeffs + ? Number(this.refGaugeCoeffs[2].value).toFixed(2) + : ""; const coeffDanger = this.refGaugeCoeffs - ? this.refGaugeCoeffs[0].value + ? Number(this.refGaugeCoeffs[0].value).toFixed(2) : ""; const messagesPerState = { OK:
--- a/client/src/components/layers/Layers.vue Mon Sep 16 16:41:56 2019 +0200 +++ b/client/src/components/layers/Layers.vue Mon Sep 16 16:46:29 2019 +0200 @@ -5,7 +5,7 @@ { expanded: showLayers } ]" > - <div class="position-relative" style="width: 18rem; min-height: 350px;"> + <div class="position-relative" style="width: 20rem; min-height: 350px;"> <UIBoxHeader icon="layer-group" :title="label"