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

Pink shadow stays behind when manipulator is moved #119

Closed
KatieWoe opened this issue Feb 6, 2019 · 10 comments
Closed

Pink shadow stays behind when manipulator is moved #119

KatieWoe opened this issue Feb 6, 2019 · 10 comments
Labels

Comments

@KatieWoe
Copy link
Contributor

KatieWoe commented Feb 6, 2019

For phetsims/qa#278. Likely to also be found in phetsims/qa#277
Reminds me of phetsims/wave-interference#238, though that was solved by a firefox update.
This was found on Level 3 of Graphing Slope-Intercept on Firefox on Mac 10.14. I was able to see this very briefly on Win 10 firefox, but the effect disappears on its own very quickly there. When mousing over and dragging the three pink dots that can be used to make a line in the game, a shadow appears behind the point. When the point is being moved, the shadow moves as well. However, on firefox (have not yet seen elsewhere) the shadow sometimes stays behind. This is best seen on a Mac, as it seems to vanish quickly on Windows. On Mac, it will stay as is, seemingly until the mouse clicks elsewhere on the screen.
To reproduce, go to a game level that has a problem where you create a line using these tools. Once you have such a problem, use the mouse to drag around the points. If it does not occur, drop the point and pick up another. Repeat until this occurs.
screen shot 2019-02-06 at 3 04 25 pm
screen shot 2019-02-06 at 3 05 29 pm

@KatieWoe
Copy link
Contributor Author

KatieWoe commented Feb 6, 2019

Edit: On Mac, the effect doesn't seem to go away when you click elsewhere. They do go away if you drag something (another point) over the spot. It does occur on Graphing Lines as well.

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 6, 2019

I reproduced this in Graphing Lines on Firefox 65 + macOS 10.13.6. Nothing sim-specific is causing this. This is a scenery redraw problem, one of the more severe ones that I've seen. @jonathanolson suggestions on the best way to work around this? Use a different renderer? Severely expand the bounds?

screenshot_126

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 7, 2019

This issue was originally opened in the graphing-slope-intercept repo. Since Graphing Slope-Intercept is a subset of Graphing Lines, I'm going to transfer this issue to graphing-lines repo.

@pixelzoom pixelzoom transferred this issue from phetsims/graphing-slope-intercept Feb 7, 2019
@pixelzoom
Copy link
Contributor

In Slack, @jonathanolson said:

Trying bounds expansion first with a transparent node may help. Otherwise using renderer:canvas would probably also prevent it.

pixelzoom added a commit that referenced this issue Feb 9, 2019
@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 9, 2019

The above commit uses the renderer: 'canvas' workaround, applied only to the manipulator's "halo". In Manipulator.js:

      var haloNode = new Circle( 1.75 * radius, {
        fill: mainColor.withAlpha( options.haloAlpha ),
        pickable: false,
        visible: false,
        renderer: 'canvas' // Workaround for Firefox graphics artifacts, see phetsims/graphing-lines/issues/119
      } );

Tested on iOS 12.1.3 and macOS 10.14.2 with all supported browsers.

@KatieWoe please verify in master. If all looks OK, leave open for regression testing in next RC.

@KatieWoe
Copy link
Contributor Author

Also looks good on master on firefox Win 10 and Mac 10.13

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 11, 2019

Pending regression testing in 1.3.0-rc.2.

@pixelzoom pixelzoom removed their assignment Feb 11, 2019
@pixelzoom pixelzoom changed the title Pink shadow stays behind when point is moved Pink shadow stays behind when manipulator is moved Feb 12, 2019
@KatieWoe
Copy link
Contributor Author

I saw the "appears then quickly disappears" behavior on Win 10. Seen in Graphing Lines Level 6.
seenpinkflash

@pixelzoom
Copy link
Contributor

My apologies, the fix in ba2c684 did not get cherry-picked into the 1.3 branch, so it's not in 1.3.0-rc.2. Please skip this we'll come back to it in a quick 1.3.0-rc.3.

pixelzoom added a commit that referenced this issue Feb 12, 2019
@KatieWoe
Copy link
Contributor Author

This looks good for both rcs on Mac and Win

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

3 participants