phetsims/vector-addition

investigate strategies to avoid overlapping labels

Closed this issue · 6 comments

... as in this situation in the Explore 1D screen:

screenshot_1312

If it's relatively easy to address, great. If not, students can just move the vector.

1D case is more important than 2D case. And this issue is relatively low priority, could publish as is.

It looks like the location chosen for labels didn't consider the angle indicator. For example:

screenshot_1500

Deciding where labels should be placed based on the location of other vectors is a difficult problem in general, and not feasible for the current implementation. It might also do more harm than good, resulting in labels jumping around while you're moving something.

So I think we should limit this issue to a single vector. That is, prevent the label and angle indicator from overlapping. Label positioning is handled in RootVector.updateLabelPositioning.

In the above commits, I adjusted the label position so that it never overlaps the angle indicator. Examples for all of the cases are shown below.

@arouinfar @arouinfar I'm not sure where to go from here. Please advise.

screenshot_1506

screenshot_1515

screenshot_1507

screenshot_1508

screenshot_1509

screenshot_1510

screenshot_1511

screenshot_1512

screenshot_1513

screenshot_1514

Discussed with @pixelzoom over slack, since this would be a hard problem to address in general, what has been done so far seems perfectly sufficient for 1.0

@arouinfar if you agree with #93 (comment), then please close. Otherwise please advise on how to proceed.

Discussed with @pixelzoom over slack, since this would be a hard problem to address in general, what has been done so far seems perfectly sufficient for 1.0

Agreed, let's close.