phetsims / number-line-distance

"Number Line: Distance" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 3 forks source link

Review Pointer Areas #38

Closed SaurabhTotey closed 3 years ago

SaurabhTotey commented 3 years ago

Standard code review issue. Created for #35.

SaurabhTotey commented 3 years ago

Worked with @jbphet to look through pointer areas and make some updates. Assigning to @amanda-phet to review.

amanda-phet commented 3 years ago

Can we expand the cursor area (the blue region) for the person? Usually the bounds of the png are fine for a cursor, but in this case the person is quite small.

image

Maybe something like this? image

SaurabhTotey commented 3 years ago

I have slightly extended the mouse area for the person point controller. Assigning to @amanda-phet to review.

amanda-phet commented 3 years ago

Thank you! I think this is a nice improvement.

pixelzoom commented 3 years ago

Reopening. While playing with the sim on a MacBook Pro, I find the thermometers in the Explore screen to be a bit difficult to grab, especialy by their glass tube. @amanda-phet do you think it would be OK to expand mouseArea for these?

EDIT: Imo, ALL of the items in the toolboxes should have identical mouseArea and touchArea. There's no harm in making the mouseAreas larger.

pixelzoom commented 3 years ago

The touchAreas for points in the Generic screen look wrong, see below. I'm guessing that you have an invisible label below the point, which appears when you put a point on the number line. You can fix this by setting the pointer areas based on visibleBounds instead of localBounds, and adjusting when visibleBoundsProperty changes.

screenshot_1067

EDIT: Similar problem in vertical number-line mode:

screenshot_1069
amanda-phet commented 3 years ago

Reopening. While playing with the sim on a MacBook Pro, I find the thermometers in the Explore screen to be a bit difficult to grab, especialy by their glass tube. @amanda-phet do you think it would be OK to expand mouseArea for these?

Sure! I think it is fine to have those be larger.

amanda-phet commented 3 years ago

The touchAreas for points in the Generic screen look wrong, see below. I'm guessing that you have an invisible label below the point, which appears when you put a point on the number line. You can fix this by setting the pointer areas based on visibleBounds instead of localBounds, and adjusting when visibleBoundsProperty changes.

These touch areas were expanded in previous number line sims so you can easily hold the point a bit lower. I can't remember if it was PhET team members or students in interviews, but someone was having trouble grabbing these, and the expanded areas seem to be working well.

pixelzoom commented 3 years ago

These touch areas were expanded in previous number line sims

OK! Then please ignore that bit of feedback.

SaurabhTotey commented 3 years ago

I have dilated the TemperaturePointControllerNodes mouseArea. I'll leave the issue assigned to @amanda-phet.

amanda-phet commented 3 years ago

That works for me.