//Bug Report [+solution] TMapSeries.onClick
Posted: Tue Dec 09, 2008 2:59 am
I am working with TMapSeries drawing numerous balloons on the chart. I noticed that if some of the top shapes are made invisible, then they are still clickable, which is wrong, as they obstruct underlying shape objects.
Please find below corrected code for Clicked(..) function. Please note that while this code is for TeeChart 7.12, TC8.x still has this bug (can see it in Tee8new.exe).
regards,
odissey1
Please find below corrected code for Clicked(..) function. Please note that while this code is for TeeChart 7.12, TC8.x still has this bug (can see it in Tee8new.exe).
regards,
odissey1
Code: Select all
// Tee Bug with TMapSeries (clicked invisible polygons)
// TeeChart 7.12->
unit TeeMapSeries;
...
function TMapSeries.Clicked(x, y: Integer): Integer;
var tmpClip : Boolean;
tmpRect : TRect;
function IsShapeVisible(Shape:TPolygonSeries):Boolean;
var tmp : Integer;
tmp2 : Integer;
begin
//correction->
//or: if not Shape.Polygon.Points.Visible then begin
if not Shape.Visible then begin
result:=False;
Exit;
end;
//<-correction
if tmpClip then
...
...
...
end
else result:=True;
end;