Open brroberts1231 opened 7 years ago
Since the grid is not visible, when you drag a charge out, it will not be snapped to the grid. But when you make the grid visible again, the charge is not on a vertex even though Snap to Grid is true.
@arouinfar is this desired? Essentially you get no snap while toggling the grid, ever. It's only when toggling snap to grid, which seems fine?
@jonathanolson, the other part of this issue is a bug:
If the sim is reset when you have both Grid and Snap to Grid checked, Grid will be unchecked, but Snap to Grid remains checked.
@arouinfar is this desired? Essentially you get no snap while toggling the grid, ever. It's only when toggling snap to grid, which seems fine?
That's mostly correct, @phet-steele, but it's a bit more nuanced than that.
But when you make the grid visible again, the charge is not on a vertex even though Snap to Grid is true.
This behavior is undesirable. If Grid and Snap to Grid are on, the charges should always be on grid vertices. In the situation described by @brroberts1231, toggling Grid should move snap the charges to the nearest vertex. Toggling Grid should result in snapping if Snap to Grid is also on.
Toggling Grid should result in snapping if Snap to Grid is also on.
This is not just a reset all issue, as manually toggling grid off with snap still on results in the same issue.
This is seen in https://github.com/phetsims/QA/issues/508. Both the aspect where snap to grid does not happen when the grid appears while snap to grid is on, and the aspect where snap to grid is not reset.
For phetsims/QA#37 Test device: Bates
Operating System: Win 7
Browser: Chrome Version 60.0.3112.113 (Official Build) (64-bit)
Problem description: If the sim is reset when you have both Grid and Snap to Grid checked, Grid will be unchecked, but Snap to Grid remains checked. Since the grid is not visible, when you drag a charge out, it will not be snapped to the grid. But when you make the grid visible again, the charge is not on a vertex even though Snap to Grid is true. Any new charges dragged out will snap to the grid, but the ones that were dragged out previous to making the grid visible will not move.
Steps to reproduce:
Troubleshooting information (do not edit): Name: Charges And Fields URL: http://phettest.colorado.edu/charges-and-fields/build/charges-and-fields_en.html Version: 1.1.0-dev.1 2017-08-22 19:38:12 UTC Features missing: touch User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36 Language: en-US Window: 1366x662 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: 20 uniform: 253 Texture: size: 8192 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 4096x4096 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"master"},"axon":{"sha":"62935a11","branch":"master"},"babel":{"sha":"f29b96d0","branch":"master"},"brand":{"sha":"cfca902d","branch":"master"},"charges-and-fields":{"sha":"e84bfa92","branch":"master"},"chipper":{"sha":"157b6f57","branch":"master"},"dot":{"sha":"f7d9de8b","branch":"master"},"joist":{"sha":"efdda1ba","branch":"master"},"kite":{"sha":"dc5c4382","branch":"master"},"phet-core":{"sha":"6bfeef5c","branch":"master"},"phetcommon":{"sha":"7ec5d299","branch":"master"},"query-string-machine":{"sha":"c74e454e","branch":"master"},"scenery":{"sha":"d539ecd7","branch":"master"},"scenery-phet":{"sha":"ae0e06ea","branch":"master"},"sherpa":{"sha":"dba01386","branch":"master"},"sun":{"sha":"50f640e7","branch":"master"},"tandem":{"sha":"e6a58f1e","branch":"master"}}