phetsims / buoyancy

"Buoyancy" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 2 forks source link

Cannot click on edge of a cylinder #103

Closed zepumph closed 4 weeks ago

zepumph commented 2 months ago

To reproduce:

  1. Shapes screen
  2. choose either type of cylinder
  3. Try to drag around a cylinder by clicking on the tapered edge it. If you click on the center (closed part to you), it works, but otherwise I can't start a drag from the edge.

@AgustinVallejo can you reproduce this?

AgustinVallejo commented 2 months ago

I can also reproduce on my end, will take a look.

samreid commented 1 month ago

I'd like to work on this one, self assigning and unassigning @AgustinVallejo.

samreid commented 1 month ago

Fixed in the commits and it's working well in my testing. I tested with vertical and horizontal cylinders of different widths and heights and it seemed well-behaved. In my testing, I observed a 1px perimeter where the mouse is a hand but the object is not draggable. This may indicate that the code deciding whether to show a hand calls different code than *Cylinder.intersect. Should we investigate?

@zepumph or @AgustinVallejo can you please review the changes, test thoroughly and comment on the question above? Also please comment if there are other ways this code should be tested.

samreid commented 4 weeks ago

It looks like the cone is buggy too.

AgustinVallejo commented 4 weeks ago

Pushing a fix for the cone issue mentioned above, it was way simpler and due to the interactive highlight.

AgustinVallejo commented 4 weeks ago

Looking good! Closing, thanks @samreid