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

"Wolves" checkbox has an inconsistent pointer area #145

Closed
phet-steele opened this issue Jul 31, 2020 · 5 comments
Closed

"Wolves" checkbox has an inconsistent pointer area #145

phet-steele opened this issue Jul 31, 2020 · 5 comments

Comments

@phet-steele
Copy link

phet-steele commented Jul 31, 2020

The "Wolves" checkbox is the only one that cannot be enabled/disabled by clicking over its timer icon (on both screens). In the below screenshot, everything to the left of the red line can be clicked, and things to the right cannot.

Pinging @pixelzoom so he is aware, but I don't think this needs to be addressed before prototype release.

image

Seen on Win 10 Chrome 84.0.4147.89. For phetsims/qa/issues/522.

Troubleshooting Information

Name: ‪Natural Selection‬
URL: https://phet-dev.colorado.edu/html/natural-selection/1.0.0-rc.1/phet/natural-selection_all_phet.html
Version: 1.0.0-rc.1 2020-07-29 19:13:57 UTC
Features missing: touch
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Language: en-US
Window: 1456x923
Pixel Ratio: 1/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 30 uniform: 4095
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 32767x32767
OES_texture_float: true

@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 31, 2020

Thanks. Agree, this is not a showstopper for the prototype. But if it's easy, I'll probably patch this into the release branch.

@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 31, 2020

Below is a better picture of what's going on. I explicitly set the pointer areas to this.localBounds.dilated(0) so that they are rendered with ?showPointerAreas. This is very odd, since all 3 checkboxes are using the identical implementation in EnvironmentalFactorCheckbox.js -- only the text and (optional) icon are different.

screenshot_445

@pixelzoom
Copy link
Contributor

And it gets stranger... If I create the "Tough Food" checkbox before the "Wolves" checkbox, then all of the pointer areas are OK, see below. I suspect something weird is going on with AlignGroup, which is used to give all of the Text+Icon parts of the checkbox label the same effective width.

screenshot_446

pixelzoom added a commit that referenced this issue Jul 31, 2020
@pixelzoom pixelzoom changed the title Environmental Factors "Wolves' checkbox has an inconsistent pointer area "Wolves" checkbox has an inconsistent pointer area Aug 2, 2020
pixelzoom added a commit that referenced this issue Aug 3, 2020
@pixelzoom
Copy link
Contributor

pixelzoom commented Aug 3, 2020

This is a general issue with Checkbox, to be addressed in phetsims/sun#612.

In the meantime, I've applied a reasonable workaround in master and 1.0 (prototype) branch. Ready for the testing in the next RC.

@pixelzoom
Copy link
Contributor

Since the next 1.0 RC is going to be a merge from master, and this has been verified in master, I'm closing this issue.

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

2 participants