1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Better CalloutBox positioning.

This commit is contained in:
jules 2013-11-13 10:26:52 +00:00
parent 41545be958
commit aa9241a14a

View file

@ -195,7 +195,7 @@ void CallOutBox::updatePosition (const Rectangle<int>& newAreaToPointTo, const R
const Point<float> centre (constrainedLine.findNearestPointTo (targetCentre));
float distanceFromCentre = centre.getDistanceFrom (targets[i]);
if (! (centrePointArea.contains (lines[i].getStart()) || centrePointArea.contains (lines[i].getEnd())))
if (! centrePointArea.intersects (lines[i]))
distanceFromCentre += 1000.0f;
if (distanceFromCentre < nearest)