Skip to content

Commit

Permalink
moved reset up a level in class hierarchy, see #176
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Jul 1, 2022
1 parent 49a85e2 commit 24f5047
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions js/common/view/GreenhouseEffectScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ class GreenhouseEffectScreenView extends ScreenView {
* Resets view components.
*/
protected reset(): void {

// The order here is important - the model must be reset before the observation window.
this.model.reset();
this.observationWindow.reset();
}
}

Expand Down
1 change: 0 additions & 1 deletion js/waves/view/WavesScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ class WavesScreenView extends GreenhouseEffectScreenView {

public override reset(): void {
super.reset();
this.observationWindow.reset();
}
}

Expand Down

0 comments on commit 24f5047

Please sign in to comment.