-
Notifications
You must be signed in to change notification settings - Fork 6
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
ProbeNode: rotation results in incorrect default pointer areas #488
Comments
Screenshot from phetsims/beers-law-lab#236. Blue is the mouseArea. |
This is bug in Default pointer areas are set like this in 221 // Allow the client to override mouse and touch area, but fall back to the outline
222 var outline = createShape().close();
223 options.mouseArea = options.mouseArea || outline;
224 options.touchArea = options.touchArea || outline; scenery-phet demo shows the default orientation of the probe: If I rotate the scenery-phet demo ProbeNode by |
Transferring this issue from beers-law-lab to scenery-phet, since it's not specific to beers-law-lab. |
I don't see anything obviously wrong with ProbeNode. @jonathanolson is a Node's transform applied to its pointer areas? |
The touch/mouse area are in the local coordinate frame, so generally no |
I tested #488 (comment) using this patch:
And found that the hand turned into a cursor over the probe itself, not over the purple/blue area. |
I'm going to take a stab at debugging this in scenery playground. Some notes to myself:
Example:
|
Here's where the pointer areas are set in ProbeNode: var outline = createShape().close();
options.mouseArea = options.mouseArea || outline;
options.touchArea = options.touchArea || outline; If I add 2 calls to var outline = createShape().close();
options.mouseArea = options.mouseArea || outline.copy();
options.touchArea = options.touchArea || outline.copy(); So I thought that perhaps each pointer area needed a unique shape. But I tried this, and it does not resolve the problem: options.mouseArea = options.mouseArea || createShape().close();
options.touchArea = options.touchArea || createShape().close(); So I suspect that there's something funky about the Shape created by @jonathanolson could you take a peek? |
I'll take a look. |
@jonathanolson In case it's significant, note @samreid's findings in #488 (comment). For mouseArea, the cursor changes over the expected area. So it may just be that the pointer area shapes are drawn incorrectly. Also note that part of the shape is drawn correctly, and part (the partial ellipse?) is not. |
@ariel-phet I had planned to create an RC (new release branch) for pH-Scale and pH Scale: Basics this coming Monday. But since this problem is occurring in those sims, I'm going to hold off. Please prioritize this issue, and let me know how you want me to proceed with RC. |
A couple of things to note about the pH Scale case that @KatieWoe identified in #488 (comment):
And a couple more clues:
|
This problem seems to be present in any sim that uses a rotated ProbeNode. In addition to beers-law-lab and ph-scale, that includes energy-skate-park (@samreid @jessegreenberg), see screenshot below. @KatieWoe if you find other sims that are affected, please note in this issue, rather than sim-specific issues. |
Although this issue is odd, (and is worthy of investigation), it does not appear to be causing any noticeable issues (and it has existed for a long time without complaint in the published sims). It would be good to fix in the long run, but I do not see it as a blocking issue. @pixelzoom you are free to proceed with RC's as you see fit. |
@jonathanolson this is fairly easy for me to reproduce. Tried on both my windows laptop touchscreen and through the app on my phone. Basically just get the sim in this configuration: Then put your finger in near the "sag" in the wire in the button left, and you can move the probe around. Again, I don't see this as a major issue. Though easy to reproduce it is not a likely use case scenario, but it would be good to figure out why this other touch area appears. |
4/25/19 dev meeting: @ariel-phet requested that this issue be deferred and assigned to him. |
@jonathanolson @ariel-phet FYI, the bogus touchArea (red rectangle) shown in #488 (comment) was a sim-specific bug. It has been fixed, see phetsims/ph-scale#77. So the remaining problem here is the default pointer areas in ProbeNode, which does not affect interactivity. And the cause was identified by @jonathanolson in #488 (comment). |
@KatieWoe since this bug just shows something odd in a internally used tool, I am inclined to close this issue as Feel free to close if you agree. |
Reopening. While I agree that it's OK to ignore the problem as it manifests in ProbeNode, I don't think it's a good idea to ignore the underlying problem in kite. Kite is a foundational repo, and that problem could easily manifest in other places. So I'd like to see an issue that identifies the problem in kite, and refers to this issue, before closing this issue. |
@jonathanolson identified the general problem in #488 (comment):
Recommended to have him create an issue for that, including any additional information that he knows about. In face-to-face discussion, I recall him providing more details that I don't see documented in in this issue. |
Added details, image and a link in phetsims/kite#77. Closing here. |
Documented in phetsims/beers-law-lab#236. Also seen in the Concentration sim. When looking at the pointer areas of the concentration tool, the blue one that indicates mouse interaction droops down. On my iphone it seemed to occur in landscape mode, but upon checking other platforms it seems to be the norm there. This pointer area doesn't seem to be actually be interactable and the tool itself can be moved normally. As such, there is no pedagogical impact and this is likely a minor issue.
Found on the published versions of the sims.
The text was updated successfully, but these errors were encountered: