AW-4860
This commit is contained in:
parent
3c7adf012f
commit
f2e265391c
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -4,4 +4,5 @@ export interface ILayervalue {
|
||||
unit: string;
|
||||
quantity: string;
|
||||
value: number;
|
||||
scale: number;
|
||||
}
|
Loading…
Reference in New Issue
Block a user