Hi all,
I would like to create a node. If I click or select the node, there will be a message in the console.
Here are my codes.
nx.define('MyExtendNode', nx.graphic.Topology.Node, {
view: function(view) {
view.content[2].events.clickNode = this._nodeClick;
return view;
},
methods: {
init: function(options) {
this.inherited(options);
},
dispose: function() {
this.inherited();
},
_nodeClick: function(sender, event){
console.log('node clicked')
}
}
});
But there is no message in console.
How could I create a customized Node class?