From 52871efb0922572c926835a2e9d2f1cd6b96c252 Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Tue, 28 Jul 2020 20:02:23 +0200 Subject: [PATCH] fix for statistics --- .../src/fm-map/components/legend/legend.component.html | 8 +++++--- .../src/fm-map/components/legend/legend.component.ts | 4 ++-- projects/common-map/src/fm-map/models/color.map.ts | 2 +- 3 files changed, 8 insertions(+), 6 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 927443c..7068fa0 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 @@ -30,10 +30,12 @@
- - + + + + +
diff --git a/projects/common-map/src/fm-map/components/legend/legend.component.ts b/projects/common-map/src/fm-map/components/legend/legend.component.ts index c3eb47b..55ca657 100644 --- a/projects/common-map/src/fm-map/components/legend/legend.component.ts +++ b/projects/common-map/src/fm-map/components/legend/legend.component.ts @@ -88,8 +88,8 @@ export class LegendComponent implements OnInit,AfterViewInit { return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.colorMap.colormapType == "minmax"; } - bandContainsHistogram(): boolean { - return this.layer.renderer.band.histogram != null; + bandContainsStatistics(): boolean { + return this.layer.renderer.band.statistics != null; } } diff --git a/projects/common-map/src/fm-map/models/color.map.ts b/projects/common-map/src/fm-map/models/color.map.ts index 32bc9c0..f8adc05 100644 --- a/projects/common-map/src/fm-map/models/color.map.ts +++ b/projects/common-map/src/fm-map/models/color.map.ts @@ -58,7 +58,7 @@ export interface IColorMap { export interface IBand { histogram: IHistogram; - statistics?: IStatistics; + statistics: IStatistics; }