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

fitProperty should be an instance of EnumerationProperty #149

Closed
pixelzoom opened this issue Aug 28, 2019 · 3 comments
Closed

fitProperty should be an instance of EnumerationProperty #149

pixelzoom opened this issue Aug 28, 2019 · 3 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Aug 28, 2019

Related to #143 code review.

In CurveFittingModel, this should be an EnumerationProperty:

      // @public {Property.<FitType>}, the method of fitting the curve to data points
      this.fitProperty = new Property( FitType.BEST, { validValues: FitType.VALUES } );

I.e.:

      // @public the method of fitting the curve to data points
      this.fitProperty = new EnumerationProperty( FitType, FitType.BEST );
@SaurabhTotey
Copy link
Member

Sounds good, I'll get on that. Perhaps the documentation here https://github.com/phetsims/phet-core/blob/master/js/Enumeration.js#L40-L44 should be updated as well then.

@SaurabhTotey
Copy link
Member

I have made the change for CurveFittingModel. Assigning to @pixelzoom to review.

@pixelzoom
Copy link
Contributor Author

👍 Commit looks good.

I don't think the documentation for Enumeration should say anything about EnumerationProperty, for the same reason that Vector2 shouldn't say anything about Vector2Property. Those classes are values, and their API and doc shouldn't know anything about Property.

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