Fix layer index for real this time ( https://angular.io/guide/ivy-compatibility-examples#cannot-bind-to-value-property-of-select-with-ngfor )
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2020-05-27 09:14:43 +02:00
parent 7b29ca28d9
commit ca776b0cb5
3 changed files with 6 additions and 6 deletions

View File

@ -9,8 +9,8 @@
<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]="itemLayer.layerIndex">
<option *ngFor="let l of layers;" [value]="l.index">{{l.name}}</option>
<select (change)="onLayerChanged($event.target.value)">
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
</select>
</div>
<fm-map-layer-legend [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>

View File

@ -9,8 +9,8 @@
<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]="itemLayer.layerIndex">
<option *ngFor="let l of layers;" [value]="l.index">{{l.name}}</option>
<select (change)="onLayerChanged($event.target.value)">
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
</select>
</div>
<fm-map-layer-legend [showTitle]="layers.length==1" [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>

View File

@ -24,8 +24,8 @@
</div>
<div class="card menu-card pt-2">
<div *ngIf="layers.length>1">
<select (change)="onLayerChanged($event.target.value)" [value]="itemLayer.layerIndex">
<option *ngFor="let l of layers;" [value]="l.index">{{l.name}}</option>
<select (change)="onLayerChanged($event.target.value)">
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
</select>
</div>
<fm-map-layer-legend [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>