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

LabPlayPanel has redundant constructor args #112

Closed
pixelzoom opened this issue May 23, 2018 · 2 comments
Closed

LabPlayPanel has redundant constructor args #112

pixelzoom opened this issue May 23, 2018 · 2 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

Constructor signature is:

function LabPlayPanel( model, ballModeProperty, isBallCapReachedProperty, options )

Call site is:

var playPanel = new LabPlayPanel( model, model.ballModeProperty, model.isBallCapReachedProperty, {...} )

So the ballModeProperty and isBallCapReachedProperty parameters are redundant. And they are in fact used inconsistently in LabPlayPanel's constructor, sometimes using model, sometimes using the redundant parameters. E.g.:

98  if ( model.isBallCapReachedProperty.get() ) {
141 isBallCapReachedProperty.lazyLink( function( isBallCapReached ) {

So I'm going to get rid of the redundant parameters.

@pixelzoom pixelzoom self-assigned this May 23, 2018
pixelzoom added a commit that referenced this issue May 23, 2018
@pixelzoom
Copy link
Contributor Author

Similar problem with IntroPlayPanel.

pixelzoom added a commit that referenced this issue May 23, 2018
@pixelzoom
Copy link
Contributor Author

Addressed, closing.

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

No branches or pull requests

1 participant