phetsims / balloons-and-static-electricity

"Balloons and Static Electricity" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/balloons-and-static-electricity
GNU General Public License v3.0
6 stars 10 forks source link

Blank steps when dragging balloon up and down in "Very close to sweater" column #420

Closed terracoda closed 6 years ago

terracoda commented 6 years ago

From issue #419. When dragging up and down "Very close to sweater" I do not hear any progress up dates. I get black steps in between directional changes and "At top." and "At bottom."

I think this is a side effect of the fact that for "Near Sweater" or "Near Wall" we do not get progress updates.

In the case of Near Sweater, we always hear, "Near Sweater". In the case of "Near Wall" and "Very Close to wall" we have the benefit of changes between "wall, upper wall and lower wall."

@jessegreenberg, can vertical dragging alerts in the "Very close to sweater" column work the same as the "Near sweater" column? So, instead of blank steps, we hear "Very close to sweater."

jessegreenberg commented 6 years ago

Thanks for making a new issue @terracoda, looking into it.

jessegreenberg commented 6 years ago

Hmm, there is some explicit logic to cause this

        // only announce that we are very close to the sweater when moving slowly to the left
        if ( !movingSlowlyLeft ) {
          alert = null;
        }
jessegreenberg commented 6 years ago

I think this is probably there because we decided including it was too verbose when moving quickly. We could either remove it, or change it to be something like

        if ( !movingSlowlyLeft || !movingVertically ) {
          alert = null;
        }
jessegreenberg commented 6 years ago

Usage of the function that generates this alert is behind a check for when drag velocity hits zero, so I think it should be safe to completely remove the check for movingSlowlyLeft. Ill test it out.

jessegreenberg commented 6 years ago

Should be fixed above, can you please verify @terracoda?

terracoda commented 6 years ago

Will verify, thanks! I like your solution.

terracoda commented 6 years ago

@jessegreenberg, verified. Sounds good! Thanks.