Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Bug with mindfusion diagram placement. (Read 1914 times)
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Bug with mindfusion diagram placement.
Apr 1st, 2010 at 10:04am
Print Post  
Hi Stoyo

I attached following example which raises bug with mousemovement.

Can you help me with this bug fixed in mindfusion libarary [ I need it urgently ]

When the application is loaded, create the following situation as shown in diagram by replacing the nodes.
Image 1.


Now, click on the button to create two child nodes, which are placed inside the inner node. And you will have following screen.
Image2


Now select the outmost node and try to move the node position by selecting the center adjustment handle point and it works as expected.

Again re-arrange the node as shown in following fig. such that the when outernode is selected, its center adjustmenthandle is visible in the innermost node.
Image3


Now, again select the outmost node and select it center adjustment handle to move the node. When mouseup event gets fired, you will see the screen result as shown in following fig.
Image4


Now again picking same adjustment handle and if one tries the reposition the item application crashes. [ Application also gets crashed if i select any another node for repositioning for eq. the node having text "innerlocked".

Application doesn't crash if i select the innermost node [In image, node having text = 1] which is not overlapped as shown in image 3]

The sample application is attached herewith
https://cid-2b9bf77533900b84.skydrive.live.com/self.aspx/.Public/Tutorial41.zip

-Regards
Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Bug with mindfusion diagram placement.
Reply #1 - Apr 1st, 2010 at 10:51am
Print Post  
Hi Rajesh,

For now handle the ContainerChildAdded event as shown below, or if you are going to use IControlerContainerNode you could use the same code in OnDropOver override and return false instead of e.Container.Children.Remove.

Code
Select All
void diagram_ContainerChildAdded(object sender, ContainerChildEventArgs e)
{
	var container = e.Node as ContainerNode;
	if (container != null && AlreadyContains(container, e.Container))
		e.Container.Children.Remove(e.Node);
}

bool AlreadyContains(ContainerNode container, ContainerNode child)
{
	if (child.Container == container)
		return true;
	if (child.Container == null)
		return false;
	return AlreadyContains(container, child.Container);
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Re: Bug with mindfusion diagram placement.
Reply #2 - Apr 1st, 2010 at 11:47am
Print Post  
Hi Stoyo

Thanks for the quick reply. It works well.

-Rajesh
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint