Show histogram
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma
2019-12-18 10:21:25 +01:00
parent f44b079cde
commit e1fef2d7f3
5 changed files with 73 additions and 59 deletions

View File

@@ -1,4 +1,4 @@
<table class="container" *ngIf="layer">
<table class="container" *ngIf="showLegend()">
<tr>
<td colspan="2">
<div class="title">

View File

@@ -71,7 +71,9 @@ export class LegendComponent implements OnInit,AfterViewInit {
return percent < 0.1 ? "" : percent.toFixed(1) + " %";
}
showLegend(): boolean {
return this.layer && this.layer.renderer && this.layer.renderer.renderType != "MULTIBAND_COLOR";
}
showHistogram(): boolean {
return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.colorMap.colormapType == "minmax";