Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap to grid not unchecked when sim is reset #135

Open
brroberts1231 opened this issue Aug 28, 2017 · 5 comments
Open

Snap to grid not unchecked when sim is reset #135

brroberts1231 opened this issue Aug 28, 2017 · 5 comments
Labels

Comments

@brroberts1231
Copy link

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:

  1. Select Grid and Snap to Grid
  2. Click Reset All
  3. Drag a charge out
  4. Select Grid
  5. Drag out new charges

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"}}

@phet-steele
Copy link
Contributor

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?

@phet-steele
Copy link
Contributor

@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.

@samreid samreid self-assigned this Aug 28, 2017
@arouinfar
Copy link

@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.

@arouinfar arouinfar removed their assignment Aug 28, 2017
@samreid samreid removed their assignment Sep 5, 2017
@BryceAG
Copy link

BryceAG commented Sep 6, 2017

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.

@KatieWoe
Copy link
Contributor

KatieWoe commented Jun 24, 2020

This is seen in phetsims/qa#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.
snaptogridhappen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants