AW-4860
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good Details
FarmMaps/FarmMapsLib/pipeline/head This commit looks good Details

master 2023.03
Willem Dantuma 2023-03-15 12:18:23 +01:00
parent 3c7adf012f
commit f2e265391c
5 changed files with 196 additions and 187 deletions

View File

@ -1,6 +1,6 @@
{
"name": "farmmaps-lib-app",
"version": "3.0.1",
"version": "3.0.2",
"scripts": {
"ng": "ng",
"start": "ng serve",

View File

@ -7,7 +7,7 @@
<li class="border-top pt-1 pb-1 value" *ngFor="let layerValue of layers">
<div>{{layerValue.layerName}}</div>
<div>{{layerValue.date|date}}</div>
<div><span *ngIf="layerValue.quantity"><span class="me-1">{{layerValue.quantity}}</span> </span><span class="me-1 font-weight-bold">{{layerValue.value}}</span><span>{{layerValue.unit}}</span></div>
<div><span *ngIf="layerValue.quantity"><span class="me-1">{{layerValue.quantity}}</span> </span><span class="me-1 font-weight-bold">{{getScaledValue(layerValue)}}</span><span>{{layerValue.unit}}</span></div>
</li>
</ul>
<ng-template #no_data>
@ -15,4 +15,4 @@
</ng-template>
</div>
</div>
</div>>
</div>

View File

@ -59,4 +59,12 @@ export class LayerValuesComponent implements OnInit,AfterViewInit {
copyToClipboard() {
this.clipboardService$.copy(this.wkt$);
}
public getScaledValue(layerValue: ILayervalue): number {
let v = layerValue.value;
if (layerValue.scale && layerValue.scale != 0) {
v = layerValue.scale * layerValue.value;
}
return v;
}
}

View File

@ -322,9 +322,9 @@ export class MapEffects {
return;
}
});
a.push(new mapActions.GetLayerValueSuccess({date:action.itemLayer.item.dataDate,value:v,layerName:l.name,quantity:"",unit:l.unit}));
a.push(new mapActions.GetLayerValueSuccess({ date: action.itemLayer.item.dataDate, value: v, layerName: l.name, quantity: "", unit: l.unit, scale: l.scale }));
} else {
a.push(new mapActions.GetLayerValueSuccess({date:action.itemLayer.item.dataDate,value:v*scale,layerName:l.name,quantity:l.quantity,unit:l.unit}));
a.push(new mapActions.GetLayerValueSuccess({ date: action.itemLayer.item.dataDate, value: v * scale, layerName: l.name, quantity: l.quantity, unit: l.unit, scale: l.scale }));
}
}
return a;

View File

@ -4,4 +4,5 @@ export interface ILayervalue {
unit: string;
quantity: string;
value: number;
scale: number;
}