Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Remove binding of child nodes to ContainerNode (Read 3451 times)
Vitaliy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Feb 13th, 2017
Remove binding of child nodes to ContainerNode
Feb 13th, 2017 at 1:44pm
Print Post  
I'd like to use ContainerNode only to show borders of process. For it need that child nodes doesn't move together with container. It's mean that I have to have possibility add child elements to area of ContainerNode, but child elements have to be not binded with container.
Maybe I have to use some other shape?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Remove binding of child nodes to ContainerNode
Reply #1 - Feb 13th, 2017 at 1:50pm
Print Post  
Try setting container.AllowAddChildren = false and the container shouldn't become parent of dropped nodes. You might as well use TableNode without any rows if you only need the container node's appearance (rectangle with caption-bar).

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Vitaliy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Feb 13th, 2017
Re: Remove binding of child nodes to ContainerNode
Reply #2 - Feb 14th, 2017 at 7:59am
Print Post  
Thank you for answer.
When I set container.AllowAddChildren = false I cannot drop nodes to ContainerNode area. But I will try TableNode
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Remove binding of child nodes to ContainerNode
Reply #3 - Feb 14th, 2017 at 9:06am
Print Post  
Ok, adding children to container happens in its onDropOver method, so you could set it to an empty function in JavaScript if you won't be using the feature at all -

Code
Select All
ContainerNode.prototype.onDropOver = function (item) {} 



otherwise you could keep a reference to the original onDropOver function and apply it from your replacement depending on some flag you add to ContainerNodes.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint