Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom Table node creation (Read 1754 times)
Santosh
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 25th, 2015
Custom Table node creation
Mar 27th, 2015 at 10:03am
Print Post  
I had one query related to custom table node. I want to add custom attributes to table node. How to achieve that? I was able to do the same using custom node. But I need table nodes.

I need something similar for table node.

Custom Node Approach:
------------------------------
var Diagram = MindFusion.Diagramming.Diagram;
var Behavior = MindFusion.Diagramming.Behavior;
var AbstractionLayer = MindFusion.AbstractionLayer;

var ElementNode = function (parent)
{
    AbstractionLayer.initializeBase(ElementNode, this, [parent]);
}

ElementNode.prototype =
{
    //Defined custom attributes here
   setMyAttribute: function(value){
        this.myAttribute = value;
   }
   getMyAttribute: function(){
        return this.myAttribute;
   }
}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom Table node creation
Reply #1 - Mar 27th, 2015 at 11:43am
Print Post  
If by custom nodes you mean ones derived from ShapeNode as in tutorials, you can do the same with TableNodes too, just replace the base class in registerClass call, e.g.:

OrgChartNode.registerClass("OrgChartNode", MindFusion.Diagramming.TableNode);

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint