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

[mirror inputs] Drawing phenomenon when area is minimum #112

Closed
ghost opened this issue Oct 13, 2017 · 11 comments
Closed

[mirror inputs] Drawing phenomenon when area is minimum #112

ghost opened this issue Oct 13, 2017 · 11 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2017

Test device:

MacBook Air (13-inch, Early 2015)

Operating System:

macOS Sierra 10.12.6 (16G29)

Browser:

Safari Version 11.0 (12604.1.38.1.7)

Problem description:

There is a "drawing" phenomenon when area is minimum. This was discovered testing mirror inputs wrapper. This is for phetsims/qa/issues/53. This is similar to /issues/108.

Steps to reproduce:

  1. Slide the area to it's minimum value.
  2. Move cursor around.

Screenshots:

oct-13-2017 15-50-25

@ghost ghost assigned ghost and jessegreenberg and unassigned ghost Oct 13, 2017
@ghost ghost changed the title [Mirror Inputs] Drawing phenomenon when area is minimum [mirror inputs] Drawing phenomenon when area is minimum Oct 13, 2017
@phet-steele
Copy link
Contributor

@jessegreenberg...I'm going to jump the gun on assuming we will need help from @jonathanolson. Co-assigning to him.

@jessegreenberg
Copy link
Contributor

In phetsims/ohms-law#68, we added preventFit to fix an issue where components were jostling during use. Really just a shot in the dark, but could that be related?

@jonathanolson
Copy link
Contributor

This looks like the browser is having issues with how large the font ends up being. Maybe the mouse movement triggers the refresh on the top one (no clue).

Does this happen with rootRenderer=canvas?

@jessegreenberg
Copy link
Contributor

jessegreenberg commented Oct 30, 2017

@jonathanolson I cannot reproduce this problem with rootRenderer=canvas, that seems to fix it.

@jessegreenberg
Copy link
Contributor

jessegreenberg commented Oct 30, 2017

@jonathanolson is renderer: canvas for the letters in this sim a recommended fix?

EDIT: verified that fixes the problem for safari, not sure about implications for other platforms.
EDIT2: Just tested chrome, performance is a bit worse when R is very large with renderer: canvas.

@jonathanolson
Copy link
Contributor

Forcing that may affect performance and/or font/shape antialiasing.

@ariel-phet, should I look into workarounds for the specific case, so that we wouldn't have to force Canvas in this situation?

@jonathanolson
Copy link
Contributor

See #108 (comment) for potential workarounds.

@ariel-phet
Copy link

@jonathanolson I am fine with forcing canvas unless it is brutal on performance. My quick look at font shape/aliasing seemed acceptable. I would rather not look into work around if not necessary.

@jessegreenberg perhaps only force canvas on safari? I would be fine with that

@ariel-phet ariel-phet removed their assignment Oct 31, 2017
@jessegreenberg
Copy link
Contributor

One recommendation from #108 was to rasterize text to images and scale that way. I tried that in #108, but I am still seeing this problem

@jessegreenberg
Copy link
Contributor

In #108, this was fixed by rendering with canvas when using safari. Marking as fixed, pending testing.

@phet-steele
Copy link
Contributor

Fixed in macOS 10.13.1, iOS 11.0.3, and iOS 9.3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants