mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:19:28 +02:00
TAChart: Fix location of DataPointCrosshairTool cursor at perimeter of bubbles of TBubbleSeries.
git-svn-id: trunk@54316 -
This commit is contained in:
parent
3f057d8f9e
commit
b20170706a
@ -619,14 +619,14 @@ begin
|
||||
if (AResults.FYIndex = 0) then
|
||||
exit;
|
||||
|
||||
if Result and (nptPoint in AParams.FTargets) and (nptPoint in ToolTargets) then
|
||||
if Result and (nptYList in AParams.FTargets) and (nptYList in ToolTargets) then
|
||||
if (AResults.FYIndex = 1) then begin
|
||||
item := Source[AResults.FIndex];
|
||||
GetBubbleRect(item, iRect);
|
||||
rx := (iRect.Right - iRect.Left) div 2;
|
||||
ry := (iRect.Bottom - iRect.Top) div 2;
|
||||
p := ParentChart.GraphToImage(AxisToGraph(item^.Point));
|
||||
phi := -arctan2(AParams.FPoint.Y - p.y, AParams.FPoint.X - p.x);
|
||||
phi := arctan2(AParams.FPoint.Y - p.y, AParams.FPoint.X - p.x);
|
||||
SinCos(phi, sinphi, cosphi);
|
||||
AResults.FImg := p + Point(round(rx * cosPhi), round(ry * sinPhi));
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user