33 lines
1.4 KiB
TypeScript
33 lines
1.4 KiB
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { Input, Injectable } from '@angular/core';
|
|
import { Store } from '@ngrx/store';
|
|
import * as mapReducers from '../../reducers/map.reducer';
|
|
import { commonReducers, ItemTypeService, IItem, Item, ItemService, FolderService, IListItem } from '@farmmaps/common';
|
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
|
import { ForSourceTask } from '../for-item/for-sourcetask.decorator';
|
|
import { AbstractItemListItemComponent } from '../item-list-item/item-list-item.component'
|
|
import { withLatestFrom, switchMap, map, switchMapTo, catchError, mergeMap, delay } from 'rxjs/operators';
|
|
import { Observable, of } from 'rxjs';
|
|
import { ControlScaleLineComponent } from 'ngx-openlayers';
|
|
|
|
|
|
@ForItemType("vnd.farmmaps.itemtype.geotiff.processed")
|
|
@ForSourceTask("vnd.farmmaps.task.ahn")
|
|
@Injectable()
|
|
@Component({
|
|
selector: 'item-list-item-height',
|
|
templateUrl: './item-list-item-height.component.html',
|
|
styleUrls: ['./item-list-item-height.component.css']
|
|
})
|
|
export class ItemListItemHeightComponent extends AbstractItemListItemComponent implements OnInit {
|
|
@Input() item: IListItem;
|
|
selectedItem: Observable<IItem>;
|
|
|
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, private itemService$: ItemService) {
|
|
super(store, itemTypeService);
|
|
}
|
|
ngOnInit() {
|
|
this.selectedItem = this.itemService$.getItem(this.item.code);
|
|
}
|
|
}
|