diff --git a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/control-panel/control-panel.component.ts index f86f5e3d4472d530c4faded613d70b2888249182..50b85842ad6276b633b66d9c1a434247e08b94db 100644 --- a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/control-panel/control-panel.component.ts @@ -126,20 +126,15 @@ export class ControlPanelComponent implements OnInit, OnDestroy { ]).subscribe(() => this.updatePlots()) ); - this.subs.push( - this.formState.controls.imt.valueChanges.subscribe(() => this.onImt()) - ); - this.subs.push( combineLatest([ + this.formState.controls.imt.valueChanges, this.formState.controls.Mw.valueChanges, this.formState.controls.vs30.valueChanges, this.formState.controls.z1p0.valueChanges, this.formState.controls.z2p5.valueChanges, this.formState.controls.zSed.valueChanges, - ]).subscribe(() => { - this.facade.resetState(); - }) + ]).subscribe(() => this.facade.resetState()) ); } @@ -185,7 +180,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { } private onMultiSelectableParam(): void { - if (!this.facade.state().serviceResponses) { + if (!this.facade.state().usageResponse) { return; } @@ -212,8 +207,4 @@ export class ControlPanelComponent implements OnInit, OnDestroy { private updatePlots(): void { this.facade.createPlots(); } - - private onImt(): void { - this.facade.resetState(); - } } diff --git a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/state/app.facade.ts b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/state/app.facade.ts index 13c202d0d3bd2d631228fc2585f6914e6f30a742..e1788aeb6a5c9909c2c232a33b9659204ca4be67 100644 --- a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/state/app.facade.ts +++ b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/state/app.facade.ts @@ -139,10 +139,11 @@ export class AppFacade { }); this.updateState({ - plots: createPlots(this.state(), this.formGroup), serviceCallInfo, serviceResponses: null, }); + + this.createPlots(); } /**