Add zoom to show alert
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit

This commit is contained in:
Willem Dantuma
2021-01-29 11:25:37 +01:00
parent dbc330ab46
commit 321d34870e
8 changed files with 56 additions and 19 deletions

View File

@@ -22,6 +22,7 @@
</button>
</div>
</div>
<fm-map-zoom-to-show-alert [layer]="currentItemLayer()?.layer"></fm-map-zoom-to-show-alert>
</div>
<div class="card menu-card pt-2">
<div *ngIf="layers.length>1">

View File

@@ -8,6 +8,7 @@ import { ForItemType } from '../for-item/for-itemtype.decorator';
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
import { ITemporalItemLayer} from '../../models/item.layer';
import * as mapActions from '../../actions/map.actions';
import { IItemLayer } from 'common-map/public-api';
@ForItemType("vnd.farmmaps.itemtype.temporal")
@@ -27,6 +28,10 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
this.store.dispatch(new mapActions.SetLayerIndex(layerIndex));
}
currentItemLayer():IItemLayer {
return (this.itemLayer as ITemporalItemLayer)?.selectedItemLayer
}
hasNext():boolean {
let temporalItemLayer = this.itemLayer as ITemporalItemLayer;
return temporalItemLayer && temporalItemLayer.nextItemLayer != null;