phetsims / curve-fitting

"Curve Fitting" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 3 forks source link

Equation AccordionBox can prevent points from being dragged #131

Closed SaurabhTotey closed 5 years ago

SaurabhTotey commented 5 years ago

It is possible to drag the point to a place where it is completely covered by the expand/collapse accordion button and cannot be dragged out.

accordionboxcoveringpoint

I can either increase the point touch areas or decrease the touch areas for the expand/collapse button in the equation accordion box.

Assigning to @amanda-phet to choose which way would be most ideal for solving this issue.

amanda-phet commented 5 years ago

This seems like an annoying situation to be in, especially if someone doesn't realize the point is there. You can hide the curve to grab the point, but that doesn't seem like a great solution. I hesitate to change the size of the touch areas because otherwise they are all working nicely.

I guess I am leaning toward making the expandCollapseButton touch area smaller, since that is a simpler solution. We already fine-tuned the point touch areas so I don't want to mess with those any more!

@ariel-phet any thoughts?

ariel-phet commented 5 years ago

@amanda-phet @SaurabhTotey in some sims we have had a "bump out" rule. If you place an object somewhere undesirable, it "bumps" out of that position. or you could restrict the point to not go under the expand/collapse button. Perhaps ping the dev-channel for some examples of where this kind of solution has been implemented. It seems placing a point here is not very useful anyhow, and should be avoided.

SaurabhTotey commented 5 years ago

I made some behaviour that bumps the points out if they are under the expand/collapse button. The points get pushed until their center is outside of certain bounds (the bounds right now are set to be the same as the button's bounds). I can expand the bounds where the points get pushed so that they get pushed out further. Assigning to @amanda-phet to review.

amanda-phet commented 5 years ago

I was able to test this and I don't think the bump is big enough because I still have a hard time grabbing the point. Can you increase it slightly?

SaurabhTotey commented 5 years ago

I have expanded the push bounds so that the center of a point must be at outside an area that is the button's area dilated in each direction by 0.55 in terms of model/graph coordinates.

amanda-phet commented 5 years ago

That looks great to me! Thanks!