From e6cda406c96b69025b469fbc397c628a6e446890 Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Sat, 25 Jul 2020 09:57:24 +0200 Subject: [PATCH] improved alignment of legend. fixed rain in weatherservice. --- .../components/legend/legend.component.html | 24 +++++++++++++------ .../components/legend/legend.component.scss | 5 ++++ .../common/src/fm/services/weather.service.ts | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/projects/common-map/src/fm-map/components/legend/legend.component.html b/projects/common-map/src/fm-map/components/legend/legend.component.html index 5f2d503..96c5748 100644 --- a/projects/common-map/src/fm-map/components/legend/legend.component.html +++ b/projects/common-map/src/fm-map/components/legend/legend.component.html @@ -28,13 +28,23 @@ - -
-
Average: {{layer.renderer.band.histogram.mean| number:'1.0-3'}}
-
Standard deviation: {{layer.renderer.band.histogram.stddev| number:'1.0-3'}}
-
Min: {{layer.renderer.band.histogram.min| number:'1.0-3'}}
-
Max: {{layer.renderer.band.histogram.max| number:'1.0-3'}}
-
Confidence interval: {{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}}%
+ +
+
+
Average:
+
{{layer.renderer.band.histogram.mean| number:'1.0-2'}}
+
Standard deviation:
+
{{layer.renderer.band.histogram.stddev| number:'1.0-2'}}
+
Min:
+
{{layer.renderer.band.histogram.min| number:'1.0-2'}}
+
Max:
+
{{layer.renderer.band.histogram.max| number:'1.0-2'}}
+ + +
Confidence interval:
+
{{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}}%
+
+
diff --git a/projects/common-map/src/fm-map/components/legend/legend.component.scss b/projects/common-map/src/fm-map/components/legend/legend.component.scss index 8ba4fd7..428b21f 100644 --- a/projects/common-map/src/fm-map/components/legend/legend.component.scss +++ b/projects/common-map/src/fm-map/components/legend/legend.component.scss @@ -16,6 +16,11 @@ margin-bottom: 0; } +.nopadding{ + padding: 0 !important; + margin: 0 !important; +} + span.color { display:inline-block; width: 1.5em; diff --git a/projects/common/src/fm/services/weather.service.ts b/projects/common/src/fm/services/weather.service.ts index 024d7d5..f2402a9 100644 --- a/projects/common/src/fm/services/weather.service.ts +++ b/projects/common/src/fm/services/weather.service.ts @@ -91,7 +91,7 @@ export class WeatherService { minTemperature: Math.min(...wData.map(d => d.temperature)), maxTemperature: Math.max(...wData.map(d => d.temperature)), relHumidity: wData.reduce( (r, e) => r + e.relativeHumidity, 0) / wData.length, - precipitation: wData.reduce( (r, e) => r + e.rain, 0) * 10, + precipitation: wData.reduce( (r, e) => r + e.rain, 0), wSpeed: wData.reduce( (r, e) => r + e.windSpeed, 0) / wData.length, wDir: bestWindDirection, wCardinal: bestCardinal