Skip to content

Commit

Permalink
Adding subtree interrupt on refresh, see phetsims/density#56
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Feb 15, 2021
1 parent 4de5f6c commit 7987360
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/density/view/DensityMysteryScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ class DensityMysteryScreenView extends DensityBuoyancyScreenView {
spacing: 8
} );
const modeRefreshButton = new RefreshButton( {
listener: () => model.regenerate( DensityMysteryModel.Mode.RANDOM ),
listener: () => {
this.interruptSubtreeInput();
model.regenerate( DensityMysteryModel.Mode.RANDOM );
},
iconScale: 0.5
} );
const modeContent = new VBox( {
Expand Down

0 comments on commit 7987360

Please sign in to comment.