Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Changing Anchor Patters (Read 1066 times)
jstraylor
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Dec 28th, 2006
Changing Anchor Patters
Mar 20th, 2007 at 5:08pm
Print Post  
Good day,

I've got a new problem, most likely self-inflicted due to some of the things that my application needs to allow the user to do.

Here is the issue, when I create one of my electronic symbols and drop it on the chart I save the ShapeID and AnchorPatternID to the database object that represents the chart object.

Through a property box, I allow the user to change the type of item that is on the chart, and when they do it could (and often does) change the associated AnchorPatternID.

Finally, I go to redraw the item and all of its associated arrows, and I wind up with arrows that can NOT connect to anchor points because the associate AP.index is no longer valid.

I have searched and not really found a way to access the anchor pattern in such a way as to tell if the index to the AP is valid or not.

What I would like to do is to delete the associated arrow if either end of the arrow does not reach a valid anchor point.  Is there any way to do this, realizing of course that I am connecting the arrows in code so none of the events fire.

Thank you,
Jeff
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Changing Anchor Patters
Reply #1 - Mar 20th, 2007 at 6:33pm
Print Post  
Good day,

Check whether Arrow.OrgnAcnhor is greater than Arrow.Origin.AnchorPattern.Points.Count - 1, and in such a case delete the arrow. Same for DestAnchor and Arrow.Destination.

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