Skip to content
Snippets Groups Projects
Unverified Commit 0957020b authored by xgui3783's avatar xgui3783 Committed by GitHub
Browse files

Merge branch 'dev' into chore/fix_layerbrowser

parents e84b6a77 c032af60
No related branches found
No related tags found
No related merge requests found
import { Injectable, OnDestroy } from "@angular/core";
import { Effect, Actions, ofType } from "@ngrx/effects";
import { Subscription, merge, fromEvent } from "rxjs";
import { Subscription, merge, fromEvent, combineLatest } from "rxjs";
import { withLatestFrom, map, filter } from "rxjs/operators";
import { Store, select } from "@ngrx/store";
import { SELECT_PARCELLATION, SELECT_REGIONS, NEWVIEWER, UPDATE_PARCELLATION, SELECT_REGIONS_WITH_ID } from "../state/viewerState.store";
......@@ -61,9 +61,12 @@ export class UseEffects implements OnDestroy{
* older versions of atlas viewer may only have labelIndex as region identifier
*/
@Effect()
onSelectRegionWithId = this.actions$.pipe(
ofType(SELECT_REGIONS_WITH_ID),
withLatestFrom(this.updatedParcellation$),
onSelectRegionWithId = combineLatest(
this.actions$.pipe(
ofType(SELECT_REGIONS_WITH_ID)
),
this.updatedParcellation$
).pipe(
map(([action, parcellation]) => {
const { selectRegionIds } = action
const { ngId: defaultNgId } = parcellation
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment