Closed KatieWoe closed 1 year ago
It then stays the incorrect color even if you drag it around. If the line passes underneath it this happens too.
When dragging it around, it seems to "stick" to an invisible line
Reproduced in master -- both the lack of color change, and how it somehow "sticks" to where the line used to be.
I suspect that this was broken by https://github.com/phetsims/graphing-quadratics/issues/167 -- wherein we changed the look of the point tool, and made changes in both grapghing-lines and graphing-quadaratics. Note that this problem does not occur in graphing-lines, because it has a different implementation of point tool (for lines vs quadratics).
The problem was introduced in PointTool.ts by https://github.com/phetsims/graphing-quadratics/commit/2dfd1cbb on 2/18/23. This was the first phase of TypeScript conversion.
Fixed in the above commit. (Below commit, actually :)
When I converted to TypeScript, this change was made because TypeScript prefers includes
:
- quadratics.indexOf( onQuadratic ) === -1 ||
+ quadratics.includes( quadraticNear ) ||
The problem is that I got the logic inverted. I wanted "does not include", so it should have been:
+ !quadratics.includes( quadraticNear ) ||
Reopening. Please verify in 1.3.0-rc.1, just in case.
This looks good in rc.1. Closing
Test device Samsung Operating System Win 11 Browser Chrome Problem description For https://github.com/phetsims/qa/issues/959 The point tool no longer changes color when a line moves out from under it. If it is orange when on a line, and the line is changed, the point tool no longer goes white, it stays orange. This worked properly in published Steps to reproduce
Visuals
Troubleshooting information: