diff --git a/projects/common/src/fm/effects/app-common.effects.ts b/projects/common/src/fm/effects/app-common.effects.ts index 931e302..b2bfe46 100644 --- a/projects/common/src/fm/effects/app-common.effects.ts +++ b/projects/common/src/fm/effects/app-common.effects.ts @@ -103,12 +103,13 @@ export class AppCommonEffects { var a = action as appCommonActions.EditItem; var itemType = itemtypes[a.item.itemType]; var viewer = itemType.viewer; - if(viewer == 'select_as_mapitem') { + var editor = itemType.editor; + if(viewer == 'select_as_mapitem' || viewer == 'show_as_featurelist') { let queryState = { - itemCode: a.item.code, - parentCode: null, + itemCode: (viewer == 'show_as_featurelist')?null:a.item.code, + parentCode: (viewer == 'show_as_featurelist')?a.item.code:null, level: 1, - itemType: null, + itemType: (viewer == 'show_as_featurelist')?a.item.itemType:null, bboxFilter: false, query: null, tags: null, @@ -118,6 +119,8 @@ export class AppCommonEffects { }; let query = this.stateSerializerService$.serialize(queryState); this.router$.navigate(['/map', query ]) + }else if(viewer == 'edit_in_editor') { + this.router$.navigate(['/editor', editor, 'item', a.item.code]) } else { this.router$.navigate(['/viewer', viewer, 'item', a.item.code]) }