Fix click on feature
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma
2020-04-16 15:47:15 +02:00
parent d34a2069d6
commit 3e0cf6d691
7 changed files with 50 additions and 15 deletions

View File

@@ -63,6 +63,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible);
public panelCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelCollapsed);
public selectedFeature$: Observable<Feature> = this.store.select(mapReducers.selectGetSelectedFeature);
public clickedFeature: Observable<Feature> = this.store.select(mapReducers.selectGetClickedFeature);
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
public queryState$: Observable<IQueryState> = this.store.select(mapReducers.selectGetQueryState);
public period$: Observable<IPeriodState> = this.store.select(mapReducers.selectGetPeriod);
@@ -113,11 +114,8 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
this.uploadService.addFiles(droppedFile.files, droppedFile.event, { parentCode:droppedFile.parentCode, geometry:droppedFile.geometry });
}
handleFeaturesSelected(feature: Feature) {
if (feature) {
let newQuery = tassign(mapReducers.initialQueryState, { parentCode: feature.get('parentCode'), itemCode: feature.get('code'),itemType:feature.get('itemType') });
this.store.dispatch(new mapActions.DoQuery(newQuery));
}
handleFeatureClick(feature: Feature) {
this.store.dispatch(new mapActions.ClickFeature(feature));
}
handleFeatureHover(feature: Feature) {