phetsims / projectile-data-lab

"Projectile Data Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

launchButtonEnabledProperty is duplicated #229

Closed pixelzoom closed 5 months ago

pixelzoom commented 5 months ago

For code review #32 ....

Duplicated twice in VSMScreenView.ts:

     new DerivedProperty( [ model.totalProjectileCountProperty ], totalProjectileCount => {
        return totalProjectileCount < PDLQueryParameters.maxProjectilesVSMField;
      } )

Suggested change:

-      launchButtonEnabledProperty: new DerivedProperty( [ model.totalProjectileCountProperty ], totalProjectileCount => {
-        return totalProjectileCount < PDLQueryParameters.maxProjectilesVSMField;
-      } )
+      launchButtonEnabledProperty: launchButtonEnabledProperty
matthew-blackman commented 5 months ago

Fixed in the commit. Thanks for the review @pixelzoom. Closing.