diff --git a/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.html b/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.html index b379b1f095fac55e8ffc585487f1ef368c24d2f6..36c03aa08c323652eabee9fc15e619cd74927ef8 100644 --- a/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.html +++ b/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.html @@ -51,11 +51,21 @@ <div class="grid-row"> <mat-slide-toggle color="primary" - [formControl]="formGroup.controls?.cumulative" + [formControl]="formGroup.controls.cumulative" > Cumulative </mat-slide-toggle> </div> + + <!-- Weighted MFDs --> + <div class="grid-row"> + <mat-slide-toggle + color="primary" + [formControl]="formGroup.controls.weightedMfds" + > + Weighted MFDs + </mat-slide-toggle> + </div> </div> </div> diff --git a/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.ts index 0464b357210ffa9604786f5b0081f6d5a99914f8..1b97ea5b191448df36734bb60c7eb4a3dd663956 100644 --- a/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.ts @@ -113,6 +113,12 @@ export class ControlPanelComponent implements OnInit, OnDestroy { this.service.createPlots() ) ); + + this.subs.push( + controls.weightedMfds.valueChanges.subscribe(() => + this.service.createPlots() + ) + ); } ngOnDestroy(): void { diff --git a/projects/nshmp-apps/src/app/source/mfd/models/control-form.model.ts b/projects/nshmp-apps/src/app/source/mfd/models/control-form.model.ts index 1a20f315612fb19e73c392de04918cd67a72430a..d770bc6673b60f8eafe54449f5ae200a962ceb33 100644 --- a/projects/nshmp-apps/src/app/source/mfd/models/control-form.model.ts +++ b/projects/nshmp-apps/src/app/source/mfd/models/control-form.model.ts @@ -33,6 +33,8 @@ export interface ControlForm { sourceAsString: string; /** Source tree id number */ sourceTree: number | null; + /** Whether to apply the weights to the MFDs */ + weightedMfds: boolean; } /**