phetsims / pendulum-lab

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

Gravity combo box will only display Custom the first time it is chosen #106

Closed arouinfar closed 9 years ago

arouinfar commented 9 years ago

In verifying #84 and #86, I observed a bug in the gravity selection menu. This issue seems unrelated to previous issues, so opening a new issue.

If the gravity is selected to be one of the benchmark values (e.g. Moon) and then the slider/tweaker is used to adjust the value, the display should change to "Custom." This currently behaves properly, but only for the first time the slider/tweaker is used to adjust the gravity away from a benchmark value. After this, the combo box cannot display Custom, even if a custom value is selected.

One possible method to reproduce: 1) Open the sim, select any screen, and displace a pendulum 2) Use the slider and/or tweakers to change the gravity from Earth to some other value. The combo box will now show "Custom". (This is the desired behavior.) 3) Switch the gravity to a different benchmark, such a Jupiter. 4) Use the slider and/or tweakers to change the gravity. The combo box still reads "Jupiter". It should read "Custom". 5) Try selecting Custom from the drop-down menu. The combo box still reads "Jupiter." 6) Try select a different benchmark, such as the Moon and switching back to Custom. The combo box will display "Moon".

Assigning to @andrey-zelenkov.

andrey-zelenkov commented 9 years ago

Fixed custom planet choose behaviour. Reassign to @arouinfar for verification.

arouinfar commented 9 years ago

Thanks, looks good! Closing.