Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arrows not pointing to anchor pnts after Arrange (Read 3469 times)
FusionUser
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Apr 4th, 2006
Arrows not pointing to anchor pnts after Arrange
Apr 19th, 2006 at 7:49pm
Print Post  

I am dynamically creating tables and anchor points and linking arrows to output and input anchor points.  First I create all the tables and then I create the arrow by calling the createarrow method.  After each createarrow method call i call the rearrange function which uses the treelayout object's arrange method.  But some how the arrows are no longer pointing to the anchor points on the chart. All arrows are pointing to the center of the table instead.  This is the settings I use on the treeLayout object.

           treeLayout.Type = TreeLayoutType.Centered;
           treeLayout.ArrowStyle = TreeLayoutArrowType.Straight;
           treeLayout.Direction = TreeLayoutDirection.RightToLeft;
           treeLayout.ReversedArrows = false;
           treeLayout.LevelDistance = 10;
           treeLayout.NodeDistance = 10;
           treeLayout.XGap = 10;
           treeLayout.YGap = 30;
           //treeLayout.KeepRootPosition = false;
           treeLayout.Anchoring = Anchoring.Keep;
          //treeLayout.IgnoreArrowDirection = true;
           treeLayout.Root = Root;
           treeLayout.Arrange(AssessmentTree);
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrows not pointing to anchor pnts after Arran
Reply #1 - Apr 20th, 2006 at 8:43am
Print Post  
Anchoring.Keep should do that, and it seems to work fine in my test project. Could you also show me the code that defines and assigns the table anchor points?
  
Back to top
 
IP Logged
 
FusionUser
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Apr 4th, 2006
Re: Arrows not pointing to anchor pnts after Arran
Reply #2 - Apr 20th, 2006 at 12:05pm
Print Post  

I follow the sample code in the Entities sample for the most part in creating anchor points.

          // set connection points
           ArrayList al = new ArrayList();
//t is the Mindfusion table control
           for (int i = 0; i < t.RowCount; i++)
           {
               al.Clear();
//B.block.InputList contains the collection of inputs.
//There could be several outputs
               if (i < B.block.InputsList.Count)
               {
                   t[0, i].PicturePos = ImageAlign.Center;
                   t[0, i].Picture = images.Images[0];
                   IOInfo input = B.block.InputsList[i] as IOInfo;
                   t[1, i].Text = input.Id.ToString();
                   AnchorPoint ptin = new AnchorPoint(50, 50, false, true, Color.Red, 0, input.Id);
                   ptin.MarkStyle = MarkStyle.None;
                   al.Add(ptin);
               }
//B.block.OutputList contains the collection of
//outputs. Usally there will be only one output.

               if (i < B.block.OutputsList.Count)
               {
                   t[3, i].PicturePos = ImageAlign.Center;
                   t[3, i].Picture = images.Images[1];
                   IOInfo output = B.block.OutputsList[i] as IOInfo;
                   t[2, i].Text = output.Id.ToString();
                   t[2, i].TextFormat.Alignment = StringAlignment.Far;
                   AnchorPoint ptout = new AnchorPoint(50, 50, true, false, Color.Red, 3, output.Id);
                   ptout.MarkStyle = MarkStyle.None;
                   al.Add(ptout);
               }

               t.Rows[i].AnchorPattern = new AnchorPattern(
               (AnchorPoint[])al.ToArray(typeof(AnchorPoint)));
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrows not pointing to anchor pnts after Arran
Reply #3 - Apr 20th, 2006 at 12:27pm
Print Post  
You are right, the layout doesn't work with row anchor points. The developer will look into that tomorrow.
  
Back to top
 
IP Logged
 
FusionUser
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Apr 4th, 2006
Re: Arrows not pointing to anchor pnts after Arran
Reply #4 - Apr 20th, 2006 at 7:20pm
Print Post  
Thanks. We create a large tree and this feature is necessary to have keep the tree ordered.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrows not pointing to anchor pnts after Arran
Reply #5 - Apr 21st, 2006 at 9:34am
Print Post  
Actually the problem was with the AnchorPoint.Column property - the layout function ignored it. Now this version should fix that and use the specified column:

https://mindfusion.org/_temp/fcnet.zip
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint