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
3ed68efab7
commit
705d811832
@ -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]="itemLayer.layerIndex">
|
||||
<select (change)="onLayerChanged($event.target.value)" [value]="selectedLayer">
|
||||
<option *ngFor="let l of layers;" [value]="l.index">{{l.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<fm-map-layer-legend [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||
<fm-map-layer-legend [layer]="layer(layers,selectedLayer)" [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,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>
|
||||
<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>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -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]="itemLayer.layerIndex">
|
||||
<select (change)="onLayerChanged($event.target.value)" [value]="selectedLayer">
|
||||
<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,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||
<fm-map-layer-legend [showTitle]="layers.length==1" [layer]="layer(layers,selectedLayer)" [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,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>
|
||||
<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>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -23,8 +23,10 @@ export class SelectedItemShapeComponent 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));
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"issuer": "https://accounts.farmmaps.awacc.nl",
|
||||
"issuer": "https://accounts.farmmaps.awtest.nl",
|
||||
"clientId": "farmmapsdev",
|
||||
"audience": "https://farmmaps.awacc.nl/",
|
||||
"audience": "https://farmmaps.awtest.nl/",
|
||||
"requireHttps": true,
|
||||
"apiEndPoint": "https://farmmaps.awacc.nl",
|
||||
"apiEndPoint": "https://farmmaps.awtest.nl",
|
||||
"grantType":"code"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user