phetsims / atomic-interactions

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

Mouse can be off set while dragging adjustable attraction values #90

Closed KatieWoe closed 3 years ago

KatieWoe commented 4 years ago

Test device Dell Operating System Win 10 Browser Chrome Problem description For https://github.com/phetsims/QA/issues/575. Occurs in published version. As you are dragging the delta and epsilon controls on the graph, if you go beyond the bounds, then come back, the mouse will no longer be centered on the object being dragged.

Visuals draggingatom

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪Atomic Interactions‬ URL: https://phet-dev.colorado.edu/html/atomic-interactions/1.2.0-rc.2/phet/atomic-interactions_en_phet.html Version: 1.2.0-rc.2 2020-11-02 21:58:13 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Language: en-US Window: 1280x658 Pixel Ratio: 1.5/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: 32767x32767 OES_texture_float: true Dependencies JSON: {}
jbphet commented 3 years ago

I addressed this by making the drag handlers for the epsilon and sigma arrows use a fixed start position. This has been propagated to the 1.2 branch of atomic-interactions.

KatieWoe commented 3 years ago

Something similar can be seen when the graph is zoomed out. However, if it does follow the mouse you may loose some fine control, so I'm not sure if that case is worth addressing. The original expression does seem fixed on Win 10 Chrome. similarnotthesame

KatieWoe commented 3 years ago

I'm actually seeing this issue in two other instances. When grabbing the large hand that appears upon first load, and when grabbing the atom on the graph. It does not seem to happen when grabbing the atom in the play area. happenstoatom

jbphet commented 3 years ago

For the record, many of the issues described in this issue are present in the currently published version of States of Matter, which as of this writing is version 1.2.1. I'm going to make the call that it isn't worth a maintenance release of SOM to correct these, since they are basically minor inconveniences.

jbphet commented 3 years ago

I've now addressed the portions of the issue described in https://github.com/phetsims/atomic-interactions/issues/90#issuecomment-759834209 and https://github.com/phetsims/atomic-interactions/issues/90#issuecomment-761209681. I've included the fix in version 1.2.0-rc.4, and QA is assigned to verify.

DevonQui commented 3 years ago

The above issues have been fixed but I did see something related to https://github.com/phetsims/atomic-interactions/issues/90#issuecomment-759834209 where the atomic diameter slider on the graph can become off-centered although it wasn't as severe in the previous case. @jonathanolson can you confirm whether or not this is worth addressing? Here's a link to the visual on google drive.

https://drive.google.com/file/d/1vq5RnShvHGnX_N7-t5fzmNwXpOvudCdx/view?usp=sharing

jonathanolson commented 3 years ago

I'd be curious what @jbphet thinks about whether it's worth addressing? I couldn't tell if it was slight "delays" or jitter, or if it was more of a persistent problem. It almost looked behind a frame a few times, I'm curious if that's due to the Canvas/SVG differences.

@jbphet let me know, I'm happy to hop in if desired.

jbphet commented 3 years ago

Based on my review of the video, I think what @DevonQui is saying is that the sigma control arrow on the graph (which is not a slider) doesn't quite stay with the mouse as the mouse moves horizontally. This is a good observation, but it's intentional. The reason it behaves this way is because what the user is actually changing is the distance from the vertical (left) axis of the graph to the point where the graph intersects the horizontal axis. If you watch the video closely, the mouse position and this intersection point do in fact stay lined up. We just couldn't put the draggable arrow at the intersection point because it would have hidden an important part of the graph.

This was a conscious design choice, since it was mathematically difficult to compensate for the arrow position and because the important value is the one from the axis to the intersection point.

With that out of the way, I think everything here has been addressed. Closing.