Skip to content

Commit

Permalink
enabled time controls only for "space & time", #26
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Dec 14, 2020
1 parent 2f45b67 commit aa77b92
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/discrete/view/DiscreteScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ class DiscreteScreenView extends ScreenView {
} );
this.addChild( timeControlNode );

// Enabled time controls only when there is the possibility of animation.
model.domainProperty.link( domain => {
timeControlNode.enabled = ( domain === Domain.SPACE_AND_TIME );
} );

const resetAllButton = new ResetAllButton( {
listener: () => {
this.interruptSubtreeInput(); // cancel interactions that may be in progress
Expand Down

0 comments on commit aa77b92

Please sign in to comment.