Fix layer index
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
0fb71a9227
commit
7b29ca28d9
@ -28,7 +28,7 @@
|
||||
<td colspan="4" *ngIf="showConfidenceInterval()"> </td>
|
||||
</tr>
|
||||
<tr *ngIf="showConfidenceInterval()">
|
||||
<td colspan="4"><span i18n>Confidence interval:</span>{{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}} </td>
|
||||
<td colspan="4" class="pb-2 pt-2"><span i18n>Confidence interval:</span> {{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}}% </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
@ -9,19 +9,19 @@
|
||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||
<div class="card menu-card">
|
||||
<div *ngIf="layers.length>1">
|
||||
<select (change)="onLayerChanged($event.target.value)" [value]="selectedLayer">
|
||||
<select (change)="onLayerChanged($event.target.value)" [value]="itemLayer.layerIndex">
|
||||
<option *ngFor="let l of layers;" [value]="l.index">{{l.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<fm-map-layer-legend [layer]="layer(layers,selectedLayer)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||
<fm-map-layer-legend [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card menu-card">
|
||||
<ul class="p-0 mt-2">
|
||||
<li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)"><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i> <span i18n>Edit</span></a></li>
|
||||
<ng-container *ngIf="itemTypeService.isLayer(item)">
|
||||
<li *ngIf="!getItemLayer(item,selectedLayer)"><a href="#" (click)="handleAddAsLayer(item,selectedLayer)"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
||||
<li *ngIf="getItemLayer(item,selectedLayer)"><a href="#" (click)="handleRemoveLayer(item,selectedLayer)"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
||||
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -21,10 +21,8 @@ export class SelectedItemGeotiffComponent extends AbstractSelectedItemComponent
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
||||
super(store, itemTypeService,location,router);
|
||||
}
|
||||
public selectedLayer: number = 0;
|
||||
|
||||
onLayerChanged(layerIndex: number) {
|
||||
this.selectedLayer = layerIndex;
|
||||
this.store.dispatch(new mapActions.SetLayerIndex(layerIndex));
|
||||
}
|
||||
|
||||
|
@ -9,19 +9,19 @@
|
||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||
<div class="card menu-card">
|
||||
<div *ngIf="layers.length>1">
|
||||
<select (change)="onLayerChanged($event.target.value)" [value]="selectedLayer">
|
||||
<select (change)="onLayerChanged($event.target.value)" [value]="itemLayer.layerIndex">
|
||||
<option *ngFor="let l of layers;" [value]="l.index">{{l.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<fm-map-layer-legend [showTitle]="layers.length==1" [layer]="layer(layers,selectedLayer)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||
<fm-map-layer-legend [showTitle]="layers.length==1" [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card menu-card">
|
||||
<ul class="p-0 mt-2">
|
||||
<li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)" ><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i> <span i18n>Edit</span></a></li>
|
||||
<ng-container *ngIf="itemTypeService.isLayer(item)">
|
||||
<li *ngIf="!getItemLayer(item,selectedLayer)"><a href="#" (click)="handleAddAsLayer(item,selectedLayer)" ><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
||||
<li *ngIf="getItemLayer(item,selectedLayer)"><a href="#" (click)="handleRemoveLayer(item,selectedLayer)" ><i class="fa fa-eye" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" ><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
||||
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)" ><i class="fa fa-eye" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -26,7 +26,6 @@ export class SelectedItemShapeComponent extends AbstractSelectedItemComponent {
|
||||
public selectedLayer: number = 0;
|
||||
|
||||
onLayerChanged(layerIndex: number) {
|
||||
this.selectedLayer = layerIndex;
|
||||
this.store.dispatch(new mapActions.SetLayerIndex(layerIndex));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user