Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up code that deals with EnabledNode options in Slider #637

Closed
pixelzoom opened this issue Oct 15, 2020 · 1 comment
Closed

clean up code that deals with EnabledNode options in Slider #637

pixelzoom opened this issue Oct 15, 2020 · 1 comment

Comments

@pixelzoom
Copy link
Contributor

In d640f5c for #257, we decided that options to EnabledComponent should not be mutually exclusive, because subclasses (and other clients) have a legitimate need to specify defaults.

@zepumph pointed out that this bit of code in Slider.js should therefore be cleaned up:

    // Extra logic to prevent providing two conflicting options to EnabledNode
    if ( !options.enabledProperty ) {
      options = merge( {

        // EnabledNode
        enabledPropertyOptions: {
          phetioFeatured: true
        }
      }, options );
    }
@pixelzoom pixelzoom self-assigned this Oct 15, 2020
pixelzoom added a commit that referenced this issue Oct 15, 2020
@pixelzoom
Copy link
Contributor Author

Cleaned up in the above commit. @zepumph please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants