Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic GetArrowAt() (Read 2776 times)
Hallo.Amt
YaBB Newbies
*
Offline



Posts: 5
Joined: Mar 24th, 2006
GetArrowAt()
Mar 24th, 2006 at 7:47am
Print Post  
Hi there,

I just tried to create an arrow context menu using GetArrowAt(). It looks like that

Arrow arr = FC.GetArrowAt(e.Location,10f) as Arrow;
if (arr != null)
{
//Show arrow context menu
}
else
{
//Show normal context menu
}

It seems like the GetArrowAt() is just looking in the area beneath the arrow and not above it. I also tried with maxDist = -10 but it did not help.

Thanks Justus

P.S. I'm using version 4.03
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GetArrowAt()
Reply #1 - Mar 24th, 2006 at 10:37am
Print Post  
Hi,

What is the arrow.Style ? GetArrowAt looks at boths sides of the arrow, but Bezier arrows are approximated with several straight line segments and the approximation might not be accurate if the Bezier curve bends a lot.

Stoyan
  
Back to top
 
IP Logged
 
Hallo.Amt
YaBB Newbies
*
Offline



Posts: 5
Joined: Mar 24th, 2006
Re: GetArrowAt()
Reply #2 - Mar 26th, 2006 at 8:31pm
Print Post  
Hi,

Thanks for your reply. The arrow.Stiyle ist Straight or Cascading. But it sems quite random to me wether i get an arrow or not, in one diagram it works above in another not at all. Seems a little random to me  ???

Justus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GetArrowAt()
Reply #3 - Mar 27th, 2006 at 5:41am
Print Post  
Do you invoke GetArrowAt in the handler of the DocClicked event? This event is raised only if users click on an empty spot of the document and not on a diagram element, so if they click an arrow, the code would not be executed at all.

If that is the case, try handling the ArrowClicked event and keep in mind that the coordinates supplied to this event are relative to the BoundingRectangle of the clicked arrow.

Stoyo
« Last Edit: Mar 27th, 2006 at 8:14am by Stoyo »  
Back to top
 
IP Logged
 
Hallo.Amt
YaBB Newbies
*
Offline



Posts: 5
Joined: Mar 24th, 2006
Re: GetArrowAt()
Reply #4 - Mar 27th, 2006 at 7:15am
Print Post  
Thanks,

Works great with Arrow clicked. I used the MouseUp-event before.

Justus
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint