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

Why isn't "step" button in play controls a "fire on hold" button? #203

Closed
ariel-phet opened this issue Nov 3, 2015 · 12 comments
Closed
Assignees

Comments

@ariel-phet
Copy link

@pixelzoom only assigning you since I figure you can answer this question, but also could be an appropriate developer meeting question.

It seems to me the default for our "step" button when it comes to play/pause/step controls should be that it is a "fire on hold" button like the tweaker. Would that be an easy change to make. I encountered this while using bending light and it seemed it would be natural to allow that functionality.

@samreid
Copy link
Member

samreid commented Nov 3, 2015

In discussion with @ariel-phet, he suggested firing a step event every 250ms or so.

@pixelzoom
Copy link
Contributor

Do you mean scenery-phet.StepButton? (This issue is in sun.)

Fire-on-hold seems like a fine option to add to that button (on by default?) It's implemented in sun.PushButtonModel (options below), so you should be able to add it easily to StepButton. I would start with the default delay and interval and see how that feels.

      // fire-on-hold feature
      fireOnHold: false, // is the fire-on-hold feature enabled?
      fireOnHoldDelay: 400, // start to fire continuously after pressing for this long (milliseconds)
      fireOnHoldInterval: 100 // fire continuously at this interval (milliseconds)

@samreid
Copy link
Member

samreid commented Nov 3, 2015

I added fireOnHold to StepButton (on by default) in the above commit, this will affect all sims that use StepButton. We should spot-test a few sims that use this feature. It is working great in Bending Light.

@samreid
Copy link
Member

samreid commented Nov 3, 2015

I used the default options and they seemed good in Bending Light.

@ariel-phet
Copy link
Author

BTW @pixelzoom I did not know where StepButton lived, so sun was my best guess...

@pixelzoom
Copy link
Contributor

No problem. I've never used the step button, and didn't know if there was in fact only one, so thought it best to clarify. Also didn't notice when reading the GitHub notification on my phone that you had created the issue.

jbphet added a commit to phetsims/scenery-phet that referenced this issue Nov 3, 2015
@jbphet
Copy link
Contributor

jbphet commented Nov 3, 2015

Just tried this in Neuron, and it works great, but it was weird that the StepBackButton didn't work the same way, so I've added it there as well.

@jessegreenberg
Copy link
Contributor

Just tried it in Molecules and Light, works well and the default options look good there too.

@pixelzoom
Copy link
Contributor

No usages is my sims.

@jbphet
Copy link
Contributor

jbphet commented Nov 3, 2015

All devs will test the sims for which they are responsible and will report any issues here. If nothing found in a week, this can be closed.

@pixelzoom
Copy link
Contributor

Sims to be tested:

  • bending-light
  • color-vision
  • energy-forms-and-changes
  • energy-skate-park-basics
  • fluid-pressure-and-flow
  • gravity-and-orbits
  • molecules-and-light
  • neuron
  • pendulum-lab
  • rutherford-scattering
  • states-of-matter
  • wave-on-a-string

@samreid
Copy link
Member

samreid commented Nov 6, 2015

I checked all of the sims for which I am primary developer, as well as pendulum lab and wave on a string. Everything looks great, nice suggestion @ariel-phet. Closing.

@samreid samreid closed this as completed Nov 6, 2015
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

5 participants