phetsims / expression-exchange

"Expression Exchange" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 2 forks source link

Terms can be lost off-screen on very large expressions #106

Closed EthanWJohnson closed 7 years ago

EthanWJohnson commented 7 years ago

Seen on Win 10 Chrome

This seems to be a combination of two behaviors; first, when adding multiple-term expressions together the dropped expression will always add itself to the right of the anchor expression, and second, the anchor expression can be moved while the dropped expression is in transit, cancelling their merge.

Steps to do; 1.) Make very large expression. Drag it as far to the right as possible. 2.) Make another expression of 2 or more terms. 3.) Drop second expression on large one. It will move to place itself on the rightmost of the large expression. 4.) Move the large expression away immediately after dropping the second one.

The second expression is now lost off-screen. You can't get it back either without resizing the window to be very long and thin or resetting; putting the large expression to it pulls it to the right of the lost expression, losing that one too.

Related to https://github.com/phetsims/tasks/issues/860

Debug Info: Name: ‪Expression Exchange‬ URL: http://www.colorado.edu/physics/phet/dev/html/expression-exchange/1.1.0-dev.3/expression-exchange_en.html Version: 1.1.0-dev.3 2017-06-13 18:51:38 UTC Features missing: touch User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Language: en-US Window: 1920x960 Pixel Ratio: 1/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: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"5c3f9204","branch":"master"},"axon":{"sha":"045bd1b0","branch":"master"},"babel":{"sha":"6d9fa297","branch":"master"},"brand":{"sha":"c904b097","branch":"master"},"chipper":{"sha":"80ae1f14","branch":"master"},"dot":{"sha":"6b4ec39c","branch":"master"},"expression-exchange":{"sha":"5d9ee7b4","branch":"master"},"joist":{"sha":"b35547e9","branch":"master"},"kite":{"sha":"7d2df183","branch":"master"},"phet-core":{"sha":"76ec0204","branch":"master"},"phetcommon":{"sha":"ca2f62cd","branch":"master"},"query-string-machine":{"sha":"c74e454e","branch":"master"},"scenery":{"sha":"c2248424","branch":"master"},"scenery-phet":{"sha":"01067d19","branch":"master"},"sherpa":{"sha":"812fdf9e","branch":"master"},"sun":{"sha":"32cc2197","branch":"master"},"tandem":{"sha":"7b8b8188","branch":"master"},"vegas":{"sha":"45acc1de","branch":"master"},"vibe":{"sha":"5e8151e1","branch":"master"}}

jbphet commented 7 years ago

I've added code that recognizes this situation and retrieves the lost expression. I'll leave this open and unassigned for now, and will have it tested on the next release.

phet-steele commented 7 years ago

@jbphet, perform the same procedure as above but replace step 4 with something else:

1.) Make very large expression. Drag it as far to the right as possible. 2.) Make another expression of 2 or more terms. 3.) Drop second expression on large one. It will move to place itself on the rightmost of the large expression. 4.) Cut the larger expression.

The other expression will be lost off screen. Performed in 1.1.0-dev.4

jbphet commented 7 years ago

Added code to prevent combining if expression is gone when destination reached. Ready for test.

EthanWJohnson commented 7 years ago

Disregarding being difficult to attempt, i'm unable to replicate the bug using either method, so it seems like its fixed and should stay fixed unless an equal but opposite code change makes it happen again.