Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom nodes in NodeListView (Read 1848 times)
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
Custom nodes in NodeListView
Oct 24th, 2013 at 7:21pm
Print Post  
Hi,

How can I add the custom shapes to NodeListView control and enable drag and drop functionality?

Thanks
Kiran B
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom nodes in NodeListView
Reply #1 - Oct 25th, 2013 at 8:40am
Print Post  
Hi,

You can add custom nodes only on the client side at this time, using the NodeListView.addNode method. Nodes should have a clone function implemented in order to enable drag-and-drop:

Code
Select All
// in CustomNode prototype
clone: function ()
{
    var copy = CustomNode.callBaseMethod(this, "clone", []);

    copy.setLabel(this.label);
    copy.setNodeType(this.nodeType);

    return copy;
}, 



I hope that helps,
Stoyan
« Last Edit: Oct 25th, 2013 at 10:33am by Stoyo »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint