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

Balloon Positioning inconsistent when reset button is pressed #535

Closed Nancy-Salpepi closed 3 years ago

Nancy-Salpepi commented 3 years ago

Test device MacBook Air (m1 chip)

Operating System 11.5.2

Browser safari

Problem description https://github.com/phetsims/qa/issues/706

When the reset balloons button is pressed, whichever balloon had focus last is the balloon that is in front after the reset. Is this OK behavior?

Steps to reproduce

  1. Select the 2 balloons option
  2. Move the the yellow balloon and then move the green balloon
  3. Press the "reset balloons" option. The green balloon will be in front.
  4. Move the green balloon and then move the yellow balloon.
  5. Press the "reset balloons" button and the yellow balloon will now be in front.

This also occurs when the Reset All button is used and then the screen is switched to 2 balloons. This behavior also occurs in the published sim.

Visuals

Screen Shot 2021-09-10 at 3 11 46 PM Screen Shot 2021-09-10 at 3 31 46 PM

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Balloons and Static Electricity‬ URL: https://phet-dev.colorado.edu/html/balloons-and-static-electricity/1.5.0-rc.1/phet/balloons-and-static-electricity_all_phet.html Version: 1.5.0-rc.1 2021-09-07 23:14:39 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15 Language: en-us Window: 1440x683 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 8192x8192 OES_texture_float: true Dependencies JSON: {}

jbphet commented 3 years ago

Nice catch @Nancy-Salpepi - This is definitely incorrect behavior. I've added code to restore the default layering on reset-all and reset-balloons. This have been cherry-picked to the 1.5 release branch.

Nancy-Salpepi commented 3 years ago

Looks good now. The green balloon is always in front after reset.

KatieWoe commented 3 years ago

Reopening. This seems mostly fixed, but when you first enter the sim, the green balloon is in the back. Reset, or Reset All put it in front. resetnotstart

Nancy-Salpepi commented 3 years ago

Nice catch @KatieWoe

jbphet commented 3 years ago

Somehow I'd missed the fact that the green balloon is in the back by default. I've changed things so that the reset operations put the yellow balloon in front.

For the record, the original problem reported here exists in the version that is currently live on the PhET website (version 1.4.16).

Nancy-Salpepi commented 3 years ago

Yellow balloon is always in front now.