Strange Behavior of Links in TSimpleGraph

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

Strange Behavior of Links in TSimpleGraph

Postby simone » March 22nd, 2017, 10:15 am

Dear Kambiz, Dear All,

Using TSimpleGraph I noticed a strange behavior in linking between nodes.

I have two rectangles in the graph R1 and R2. In the first I placed a litte square S1 in the left-upper corner,
in the second I placed a little square S2 in the right-lower corner. I draw a link between R1 and S1, and
a link between R2 ad S2. Why the second link is invisible?

I uploaded a screenshot to figure this situation.

This behavior creates some problems in my application, that is based on TSimpleGraph. Is it possible
to change it?

Thanks in advance. Simone.
Attachments
screnshot.PNG
screnshot.PNG (5.21 KiB) Viewed 279 times
simone
Member
Member
 
Posts: 3
Joined: October 18th, 2016, 4:08 pm

Re: Strange Behavior of Links in TSimpleGraph

Postby Kambiz » March 29th, 2017, 6:36 am

Hi Simone,

The endpoints of links between two nodes are determined based on the center points of the nodes.
To change the behavior, you need to subclass TGraphLink and override its RelativeHookAnchor method.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 1 guest