phetsims / gene-expression-essentials

An educational simulation about how genes work to create proteins.
GNU General Public License v3.0
4 stars 6 forks source link

Hints disappear aggressively #114

Closed phet-steele closed 6 years ago

phet-steele commented 6 years ago

Location "hints" are intended to be enabled throughout the user's drag. However, they can be hidden prematurely if, somewhere else in the sim, a certain event happens.

Generally, hints disappear when:

  1. Ribosomes attach to mRNA
  2. A TF attaches to DNA
  3. RNAP attaches to DNA
  4. A Destroyer attaches to mRNA

If any of these four events occur on the screen while the user is doing something else (and maybe I'm missing one or two), all hints will hide. For example in the below video, I am holding the RNAP to reveal its hint on the DNA. As soon as (1) above happens, the hint hides even when I am still holding the RNAP.

gee06

Seen on macOS 10.13.2 Chrome. For phetsims/QA/issues/79.

Troubleshooting Information URL: https://www.colorado.edu/physics/phet/dev/html/gene-expression-essentials/1.0.0-rc.2/gene-expression-essentials_en.html Version: 1.0.0-rc.2 2017-12-14 04:01:29 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36 Language: en-US Window: 1920x1014 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 32 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 80) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"80b60293","branch":"HEAD"},"babel":{"sha":"b3e5480b","branch":"master"},"brand":{"sha":"cfca902d","branch":"HEAD"},"chipper":{"sha":"6b338220","branch":"HEAD"},"dot":{"sha":"85ef2bbf","branch":"HEAD"},"gene-expression-essentials":{"sha":"4acd971b","branch":"HEAD"},"griddle":{"sha":"4ba39b4f","branch":"HEAD"},"joist":{"sha":"ea429056","branch":"HEAD"},"kite":{"sha":"2c921cba","branch":"HEAD"},"phet-core":{"sha":"c30d15ed","branch":"HEAD"},"phetcommon":{"sha":"b13138d2","branch":"HEAD"},"query-string-machine":{"sha":"c74e454e","branch":"HEAD"},"scenery":{"sha":"92a2872d","branch":"HEAD"},"scenery-phet":{"sha":"d394b9df","branch":"HEAD"},"sherpa":{"sha":"0d590744","branch":"HEAD"},"sun":{"sha":"99a0abef","branch":"HEAD"},"tandem":{"sha":"c1e98f69","branch":"HEAD"}}
jbphet commented 6 years ago

The hints were being deactivated because a new protein molecule was being added to the model, and its listener function for its userControlledProperty was executing, seeing that it was non-user-controlled, and deactivating the hints. I've modified the code to require that the biomolecule was actually dropped by the user before hints are deactivated.

This change should have minimal impact, but a potential side effect is that hints would stick around in some cases when they shouldn't. I've tested some, and haven't been able to create such a case, but it would be good for others to try also. @phet-steele - I'm assuming that the only way to test this is on an RC, so I should roll a new one, correct?

phet-steele commented 6 years ago

Working, thanks