Skip to content

Commit

Permalink
fix: opacity saves between coherence layers
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercchase committed Sep 7, 2023
1 parent 489bbfd commit f3561d5
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export class LayerSelectorComponent implements OnInit, OnDestroy {
public breakpoint$ = this.screenSize.breakpoint$;
public breakpoint: models.Breakpoints;
public breakpoints = models.Breakpoints;
private coherenceLayerOpacity: number;


private subs = new SubSink();

Expand Down Expand Up @@ -73,6 +75,13 @@ export class LayerSelectorComponent implements OnInit, OnDestroy {
this.subs.add(
this.breakpoint$.subscribe(bp => this.breakpoint = bp)
);
this.subs.add(
this.store$.select(mapStore.getCoherenceOverlayOpacity).subscribe(
opacity => {
this.coherenceLayerOpacity = opacity;
}
)
)
}

public onNewLayerType(layerType: models.MapLayerTypes): void {
Expand All @@ -99,6 +108,7 @@ export class LayerSelectorComponent implements OnInit, OnDestroy {

public onSetCoherenceLayer(months: string): void {
this.mapService.setCoherenceLayer(months);
this.mapService.updateCoherenceOpacity(this.coherenceLayerOpacity);
}

public clearCoherenceLayer(): void {
Expand Down

0 comments on commit f3561d5

Please sign in to comment.