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

Graph connects points that go off scale #117

Closed phet-steele closed 6 years ago

phet-steele commented 6 years ago

Most likely due to changes in #110, there is some new undesired behaviour in the graph. In rc.1, if a line drawn of the graph went off scale in the positive y, there would be "gaps" to show this:

screen shot 2017-12-20 at 10 37 19 am

Now in rc.2, there is a line that snaps into appearance once the graph dips back into the visible scale. The line connects the first point that went off scale to the first point that came back into scale:

screen shot 2017-12-20 at 10 34 31 am

This is confusing, the behavior in rc.1 is desired.

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

This was due to some modifications that were made to avoid gaps in other situations, see https://github.com/phetsims/gene-expression-essentials/issues/110. I've modified the code in the graphing library (griddle) to keep track of whether the previous point was graphed and, if not, don't connect the line. This appears to work well. I regression tested this on this sim and on Neuron.

phet-steele commented 6 years ago

Good to go