Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem with cloneNode (Read 4205 times)
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Problem with cloneNode
May 25th, 2009 at 10:50am
Print Post  
Hi Stoyan,

I have sent a sample application to you(support@mindfusion.eu) Please have a look into that.

In that application we are facing following two problems:

Issue-1
=======
1) Select two or more nodes(Rectangle Node) and drag them out of the visible area of diagram and see the content disappears and they now look as blank node.

2) After 1, Interestingly, if we click on any rectangular node now then all the nodes which got blank out due to 1) now get their contents back.

Please suggest what are we missing here and how to solve this multiple selection move issue.

Issue-2
=======
1) We have also incorporated the ballooning feature for the rectangular node which can be switched on by clicking "Not Balloon" button.

2) After 1, when Mouse Enters to the rectangular node a balloon appears which should be same as the source node(Except Bounds) but it looks blank, all its contents get disappear. Intresting part of this is that if we change balloon node's brush to Transparent all its contents are visible.

Please suggest how can we see balloon's contents with some brush color. I think both the issues have some common cause please look into this.

Thanks in advance,
Bala
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with cloneNode
Reply #1 - May 25th, 2009 at 4:05pm
Print Post  
Hi Bala,

I think we have discussed this before - do not call diagram.Nodes.Add() for nodes that are created through the Factory methods. Your first issue might be caused by having some nodes twice in the diagram collections, and the Z order sorting method failing to sort them correctly.

For your second issue, move the diagram.Nodes.Add(cloudNode); line just after ShapeNode cloudNode = sourceNode.Clone(true) as ShapeNode; Otherwise it gets called after all child nodes have been added, and the parent node gets higher Z index than them. Also, imageNode.Image = sourceNode.Image; sets the Image to null, because the image is actually shown by a child of sourceNode.

Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Problem with cloneNode
Reply #2 - May 26th, 2009 at 8:59am
Print Post  
Hi Stoyan,

Thanks for the reply.Issue-2 is now solved.

We have tried  your solution for Issue-1 (i.e. use either factory or AddNode) but still we are stuck on the same issue. Please have a look in the sample sent earlier for this.

Hope to get your reply soon.

Thanks,
Bala
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Problem with cloneNode
Reply #3 - May 26th, 2009 at 9:46am
Print Post  
Hi Stoyan,

Thanks for the reply. Issue-2 is now solved.
We have tried your solution for Issue-1 (i.e. use either factory or AddNode) but still we are stuck on the same issue. If you select Node1 and Node2 and drag them to bottom side out of the visible area, you will see nodes get blank.
Please have a look in to this.

One another issue is of Window Clipping. When Expander button is clicked and if window is clipping from the screen border, window should move some left or up position and stay with the associated node.
I have written some logic for it, please have a look in to that and tell me what I am missing or what more should be added. Code lines for Window Clipping from right side is:

Code
Select All
 if ((popUp.Left + popUp.Width) > (diagram.Bounds.X + diagram.Bounds.Width))
		   {
			 Rect rc = new Rect(diagram.Bounds.X, diagram.Bounds.Y, diagram.Bounds.Width + popUp.Width, diagram.Bounds.Height);
			 diagram.Bounds = rc;

			 diagram.ScrollX = diagram.Bounds.Width + popUp.Width;
			 diagram.ScrollTo(new Point(diagram.Bounds.X + popUp.Width, diagram.Bounds.Y));

			 popUp.Left = popUp.Left - popUp.Width - 5;
			 popUp.Top = popUp.Top - 5;
		   } 



I have again sent a sample to you. Please take this sample to see the problem.

Many thanks in advance,
Bala
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Problem with cloneNode
Reply #4 - May 30th, 2009 at 6:40am
Print Post  
Hi Stoyan,

Thanks for the reply. Issue-2 is now solved. 
We have tried your solution for Issue-1 (i.e. use either factory or AddNode) but still we are stuck on the same issue. If you select Node1 and Node2 and drag them to bottom side out of the visible area, you will see nodes get blank.

Please give some suggestion for this.

Thanks,
Bala
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Problem with cloneNode
Reply #5 - Jun 2nd, 2009 at 10:00am
Print Post  
Hi Stoyan,

Any Suggestion for this?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with cloneNode
Reply #6 - Jun 2nd, 2009 at 11:43am
Print Post  
Our developer is investigating it.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with cloneNode
Reply #7 - Jun 3rd, 2009 at 4:49am
Print Post  
Hi Bala,

Could you try that with this version:
https://mindfusion.eu/_beta/wpfdiag22.zip

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with cloneNode
Reply #8 - Jun 5th, 2009 at 5:15am
Print Post  
Not sure if you are receiving the email replies from me, but the project you sent us still uses the old version. Select the diagramming.wpf.dll in Explorer and it shows version 2.1.1 in the status bar; the dll from the zip file above shows version 2.1.2. Replace the old version you are using with the new one, and ensure the "use specific version" property shown in the property window for the reference is disabled. If you keep the assemblies under source control, replace them in the repository too.

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