Aw3998 Add click
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
c6a632894d
commit
31c5e0cb52
@ -18,6 +18,7 @@ export const SETPARENT = '[Map] SetParent';
|
|||||||
export const SETPERIOD = '[Map] SetPeriod';
|
export const SETPERIOD = '[Map] SetPeriod';
|
||||||
export const STARTSEARCH = '[Map] StartSearch';
|
export const STARTSEARCH = '[Map] StartSearch';
|
||||||
export const STARTSEARCHSUCCESS = '[Map] StartSearchSuccess';
|
export const STARTSEARCHSUCCESS = '[Map] StartSearchSuccess';
|
||||||
|
export const CLICKFEATURE = '[Map] ClickFeature';
|
||||||
export const SELECTFEATURE = '[Map] SelectFeature';
|
export const SELECTFEATURE = '[Map] SelectFeature';
|
||||||
export const SELECTITEM = '[Map] SelectItem';
|
export const SELECTITEM = '[Map] SelectItem';
|
||||||
export const SELECTITEMSUCCESS = '[Map] SelectItemSuccess';
|
export const SELECTITEMSUCCESS = '[Map] SelectItemSuccess';
|
||||||
@ -112,6 +113,12 @@ export class StartSearchSuccess implements Action {
|
|||||||
constructor(public features: Array<Feature<Geometry>>, public query:IQueryState) { }
|
constructor(public features: Array<Feature<Geometry>>, public query:IQueryState) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class ClickFeature implements Action {
|
||||||
|
readonly type = CLICKFEATURE;
|
||||||
|
|
||||||
|
constructor(public feature:Feature<Geometry>) { }
|
||||||
|
}
|
||||||
|
|
||||||
export class SelectFeature implements Action {
|
export class SelectFeature implements Action {
|
||||||
readonly type = SELECTFEATURE;
|
readonly type = SELECTFEATURE;
|
||||||
|
|
||||||
@ -341,6 +348,7 @@ export type Actions = SetMapState
|
|||||||
| SetParent
|
| SetParent
|
||||||
| StartSearch
|
| StartSearch
|
||||||
| StartSearchSuccess
|
| StartSearchSuccess
|
||||||
|
| ClickFeature
|
||||||
| SelectFeature
|
| SelectFeature
|
||||||
| SelectItem
|
| SelectItem
|
||||||
| SelectItemSuccess
|
| SelectItemSuccess
|
||||||
|
@ -23,8 +23,9 @@ export abstract class AbstractFeatureListComponent {
|
|||||||
|
|
||||||
handleFeatureClick(feature:Feature<Geometry>) {
|
handleFeatureClick(feature:Feature<Geometry>) {
|
||||||
if(feature) {
|
if(feature) {
|
||||||
|
this.store.dispatch(new mapActions.ClickFeature(feature));
|
||||||
const action = this.getAction(feature);
|
const action = this.getAction(feature);
|
||||||
this.store.dispatch(action);
|
this.store.dispatch(action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user