-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dragging function under pointer tool does not change color of pointer tool #81
Comments
Point tools only change color with they are <= 0.01 units from the nearest point on a curve. When you're dragging a point tool, it will snap to a curve and will therefore satisfy this criteria. If the point tool is not being dragged and the curve moves, then the point tool will only change color if its location meets the <= 0.01 units criteria. Snapping the point tool to the curve when the point tool is not being dragged was an option that I explored, but that was problematic - it caused the point tools that were not being dragged to "follow" a curve as it moved. @amanda-phet please review and indicate whether you'd like the current behavior to change. |
Changing label from bug to design, because this is currently working as intended. |
We could probably address this by changing 0.01 to some larger number. |
@pixelzoom I think what might have been seen was that the color doesn't always change, even when you are very close, or passing through the spot. I think this is because the distance between the pointer and the line is larger than it looks, and the line is skipping past that point when being dragged. I positioned just right the pointer does change color. So I agree that this a design question. Here is a video of what I think was showing up. |
It seems like if the curve is passing through the point tool, the point tool should flicker orange/black at that moment. In @KatieWoe 's video it seems odd that it doesn't show the point when the parabola passes through the point tool. Is it because the coordinate values are to the nearest tenth, but the criteria for the point tool to change color is that the coordinates are more precise than that (to the nearest 0.01)? |
Another note: the pointer tool is less likely to flash if the slider/curve is moving quickly. |
The curve is not changing continuously, it is changing discretely. So there is nothing "passing through" the point tool. The point tool is measuring whatever is within 0.01 units of it after the quadratic(s) have changed. If you want to track the before/after state of each curve and compute whether any curve passed through a point tool, that is an entirely different (and more complicated) implementation. |
That makes sense. I think we should leave this as-is, since there is no actual bug present, and this did not come up in interviews. |
Reopening. I think it might be worth increasing the tolerance from 0.01 to 0.1, and seeing how that feels. Would that be OK to try? |
Sure, that's fine with me. |
@pixelzoom I'd be willing to do some comparisons. See if that's too far and feels off, or if it works. Either way. Let me know if you have a new dev build or want it tested on master. |
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
@amanda-phet @KatieWoe In 1.0.0-dev.39, I added a |
@pixelzoom @amanda-phet I just took a look and the pointer does indicate when the line is passing through it most of the time. It doesn't if you'r moving the line very fast, but I doubt there's anything to do about that. There is the trade-off that @pixelzoom mentioned where the pointer tool may be further from the line when it turns on. See the image. I don't think it looks too bad, and the previous version had instances where the pointer tool looked like it was in the center of the line but didn't light up. I'll look for any instances that look off, but for now this is the furthest I've seen from the center. |
The point tool doesn't need to be directly in the center of the line in these situations. As long as the coordinates shown by the point tool are actually on the line, then we're good. Since the precision of the point tool is 0.1, using |
I didn't play with other values but 0.1 is looking good to me! |
Kathy agrees that the threshold is working well. Closing. |
Test Device
Operating System
Browser
Problem Description
For phetsims/qa#211. If a pointer tool is not on top of a function and a function is dragged under the pointer tool, the pointer tool will not change color.
Steps to Reproduce
Visuals
Troubleshooting Information
Name: Graphing Quadratics URL: https://phet-dev.colorado.edu/html/graphing-quadratics/1.0.0-dev.38/phet/graphing-quadratics_en_phet.html Version: 1.0.0-dev.38 2018-10-18 21:15:53 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15 Language: en-US Window: 1105x676 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (2.1 INTEL-10.36.19) GLSL: WebGL GLSL ES 1.0 (1.20) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 15 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 16) Max viewport: 8192x8192 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"master"},"axon":{"sha":"644353d6","branch":"master"},"brand":{"sha":"1fd6682e","branch":"master"},"chipper":{"sha":"fc5919bb","branch":"master"},"dot":{"sha":"dcccfddd","branch":"master"},"graphing-lines":{"sha":"08b2b43e","branch":"master"},"graphing-quadratics":{"sha":"9b807638","branch":"master"},"joist":{"sha":"b12072c7","branch":"master"},"kite":{"sha":"380cef53","branch":"master"},"phet-core":{"sha":"269c4c8a","branch":"master"},"phet-io":{"sha":"ce77e241","branch":"master"},"phet-io-wrapper-classroom-activity":{"sha":"534dc595","branch":"master"},"phet-io-wrapper-hookes-law-energy":{"sha":"3372700d","branch":"master"},"phet-io-wrapper-lab-book":{"sha":"09507f4d","branch":"master"},"phet-io-wrappers":{"sha":"0a4a3153","branch":"master"},"phetcommon":{"sha":"a2a1aaba","branch":"master"},"query-string-machine":{"sha":"9ae63aab","branch":"master"},"scenery":{"sha":"d7e6c53e","branch":"master"},"scenery-phet":{"sha":"344597e6","branch":"master"},"sherpa":{"sha":"0989d371","branch":"master"},"sun":{"sha":"289fce23","branch":"master"},"tambo":{"sha":"fe63321c","branch":"master"},"tandem":{"sha":"2c4b970a","branch":"master"}}The text was updated successfully, but these errors were encountered: