Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) FollowMasterRotation does not seem to work (Read 7634 times)
Martin Mc
YaBB Newbies
*
Offline



Posts: 11
Location: Bracknell
Joined: Oct 23rd, 2008
FollowMasterRotation does not seem to work
Oct 23rd, 2008 at 11:52am
Print Post  
I add a new shapenode
I add a smaller shapenode
I attach the small one to the big one, to the top left corner.
I then move the master object, sub object moves correctly.
I size the master object the sub object moves correctly.

I rotate the main object by 90 degrees clockwise:
the sub object stays where it was (I expected it to move with the corner, and not rotate itself)
I resize the master object, the sub object seems to move on a diagonal line (I expected it to be still attached to the proper corner, and move with it)

I am using the FollowMasterRotation property of the group.
Am i being stupid, or does the property it not work ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FollowMasterRotation does not seem to work
Reply #1 - Oct 23rd, 2008 at 12:43pm
Print Post  
This worked for me:

Code
Select All
if (!IsPostBack)
{
	Diagram diagram = view.Diagram;

	ShapeNode n1 = diagram.Factory.CreateShapeNode(10, 10, 100, 100);
	n1.EnabledHandles = AdjustmentHandles.All;

	ShapeNode n2 = diagram.Factory.CreateShapeNode(10, 10, 10, 10);
	n2.AttachTo(n1, AttachToNode.TopLeft);
	n1.SubordinateGroup.FollowMasterRotation = true;
}
 



What arguments are you passing to the AttachTo method?
  
Back to top
 
IP Logged
 
Martin Mc
YaBB Newbies
*
Offline



Posts: 11
Location: Bracknell
Joined: Oct 23rd, 2008
Re: FollowMasterRotation does not seem to work
Reply #2 - Oct 23rd, 2008 at 3:23pm
Print Post  
I do an attach to corner. (0 being top left ?)

b.SubordinateGroup.AttachToCorner(n1,0)

I shall check your version
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FollowMasterRotation does not seem to work
Reply #3 - Oct 23rd, 2008 at 3:31pm
Print Post  
Are you using NetDiagram and doing this from JavaScript code? I can see you've also posted in the FlowchartX section of the forum?
  
Back to top
 
IP Logged
 
Martin Mc
YaBB Newbies
*
Offline



Posts: 11
Location: Bracknell
Joined: Oct 23rd, 2008
Re: FollowMasterRotation does not seem to work
Reply #4 - Oct 23rd, 2008 at 3:51pm
Print Post  
Your version works exactly how i want it to work.
My problem was that i was creating a group of all objects, then set the follow master option on that group. Which i guess now is wrong since there probably was no master box. I always thought that the first box added to the group was the master box. (it is the MainItem, is this not the same ?)
(fc being the diagram)

dim master, subordinate as shapenode
master = fc.Factory.CreateShapeNode(10, 10, 20, 40)
subordinate = fc.Factory.CreateShapeNode(10, 50, 20, 8 )
Dim group As Group = fc.Factory.CreateGroup(master)

' Attach the box to the newly created group
group.AttachToCorner(subordinate, 0)
group.FollowMasterRotation = True
master.RotationAngle = 90

Thanks for the solution
  
Back to top
 
IP Logged
 
Martin Mc
YaBB Newbies
*
Offline



Posts: 11
Location: Bracknell
Joined: Oct 23rd, 2008
Re: FollowMasterRotation does not seem to work
Reply #5 - Oct 23rd, 2008 at 3:54pm
Print Post  
whoops

I should be in FlowChart.NET area, sorry
  
Back to top
 
IP Logged
 
Martin Mc
YaBB Newbies
*
Offline



Posts: 11
Location: Bracknell
Joined: Oct 23rd, 2008
Re: FollowMasterRotation does not seem to work
Reply #6 - Oct 23rd, 2008 at 4:21pm
Print Post  
All looks good when rotating using the enabledhandles set to all, and then the user rotating using the handle. it does not seem to work when you just rotate the mainobject using the rotationangle property, do  i need to set something else if doing it programatically ?
  
Back to top
 
IP Logged
 
Martin Mc
YaBB Newbies
*
Offline



Posts: 11
Location: Bracknell
Joined: Oct 23rd, 2008
Re: FollowMasterRotation does not seem to work
Reply #7 - Oct 23rd, 2008 at 5:13pm
Print Post  
I went back to my original code, and enabled handles, the followmaster seems to work when rotating with the handles. when i use the rotation angle = 90Degrees in code, then the sub objects do not move as expected.
Even worse is that after rotating, and then you decide to resize the main object, the sub objects go all over the joint, on a diagonal. even when you have rotated using the handles.
Any ideas ?
I need to be able to attach a small box to the top left of a main box, group it, then be able to rotate the main object by 90 degrees, keeping the sub objects fixed to the corner (which is top right now, after rotating 90 deg clockwise). once that is done, the user may decide to resize the main box, and the sub box needs to still move with the new corner (top right)
I don't feel that thisis anything special, has anyone got a sample of this please.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FollowMasterRotation does not seem to work
Reply #8 - Oct 23rd, 2008 at 5:25pm
Print Post  
From what I can see in the code, the RotationAngle setter doesn't update the attached nodes at all. We'll add this tomorrow.
  
Back to top
 
IP Logged
 
Martin Mc
YaBB Newbies
*
Offline



Posts: 11
Location: Bracknell
Joined: Oct 23rd, 2008
Re: FollowMasterRotation does not seem to work
Reply #9 - Oct 24th, 2008 at 10:04am
Print Post  
when will i have to wait for this functionality to be released ? My manual rotate is just slightly out of sync
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FollowMasterRotation does not seem to work
Reply #10 - Oct 24th, 2008 at 2:30pm
Print Post  
Our developer has implemented it now. Are you our licensed customer or still using the trial version?
  
Back to top
 
IP Logged
 
Martin Mc
YaBB Newbies
*
Offline



Posts: 11
Location: Bracknell
Joined: Oct 23rd, 2008
Re: FollowMasterRotation does not seem to work
Reply #11 - Oct 26th, 2008 at 12:38pm
Print Post  
I am a customer, purchased upgrade subscription.
I will Post you direct with email address used to purchase
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FollowMasterRotation does not seem to work
Reply #12 - Oct 27th, 2008 at 9:43am
Print Post  
Ok, let me build it in release mode and look for the download link on the PM page in half an hour.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint