Closed jonathanolson closed 3 years ago
This was reported again in https://github.com/phetsims/ph-scale/issues/222, and continues to be reported by QA. I realize that it's a "display only" problem, and doesn't impact usability. But it would be nice to address, so that's we're not spending QA/dev resources on the same issue repeatedly.
This may be due to a sign error in EllitpicalArc.js, I should run a pixel comparison test and see if it shows any discrepancies. @jonathanolson please chime in if the sign change seems good to you:
I ran a snapshot comparison with that delta, without showPointerAreas
and the following sims showed differences:
Everything else is clear. Let's try to narrow these down.
I tested the top 3, natural selection, and neuron and couldn't see any differences anywhere. But I did notice many of these sims have keyboard navigation features. I'm inclined to push the fix and ask people to keep an eye out.
I slacked dev-public:
I fixed a sign error in EllipticalArc when it reduces to a regular Arc. This was manifesting in the probe pointer area as described in https://github.com/phetsims/kite/issues/77. The snapshot comparison tool indicates changes in 9 sims. I looked carefully at more than half of them and couldn’t see the discrepancy. Probably this means something minor imperceptibly changed. But I thought I should let you know in case you see something odd.
@jonathanolson can you please review?
In slack @pixelzoom said:
Thanks. That came up today for the Nth time in ph-scale, see https://github.com/phetsims/ph-scale/issues/222. Good to know it’s fixed. I’ll verify and close related issues in all of my sims that have probes. I don’t think there’s a need to patch any release branches, because this was a display-only bug.
Do you think there might be anything that was relying on this bug in EllipticalArc ?
I replied:
We have hypothesized that it was a display-only bug, but from the fix, it looks like it would affect anything that was using EllipticalArc.getNondegenerateSegments when (a) radiusX===radiusY and (b) the rotation is nonzero.
I can only hope that no code was relying on the buggy behavior. I tested several sims that rendered differently with the fix, and couldn’t pinpoint it.
I've tested in my sims that use ProbeNode, and this fix looks good. But I'm going to wait to close sim-specific issues until @jonathanolson has reviewed and closed this issue.
Looks like a perfect fix, thank you!
Thanks, closing.
From https://github.com/phetsims/scenery-phet/issues/488
Details include:
I'm mostly confirming that this is manifesting only as a display-only problem.
It looks like
Shape.transformed
is not behaving correctly for a certain class of transforms (depending on the exact scale/translation) for the probe shape. This is used for the display, but NOT in the hit testing.For instance a buggy case is the Shape:
Transforming with the matrix:
ends with the buggy case:
resulting in the bad touch area displayed: