I'm upgrading to 3.0 from 1.0 and I have the following code defined for the types plugin:
{
"default": {
"select_node": function (e) {
var NODE = this._get_node(e);
log(NODE);
type = $(NODE).attr("type");
if (type == NodeType.leafDomain || type == NodeType.leafGenerator) {
if (!this.is_open(e)) {
this.toggle_node(e);
}
} else {
this.toggle_node(e);
}
return true;
}
}
This allowed the opening/closing of a node if I clicked on the text. In 3.0 this doesn't work because "default" is only applied to nodes that don't have a type and all my nodes have a type. In 3.0, how can I open/close a node by clicking on the anchor rather than the <i class="jstree-icon jstree-ocl"></i> element?
Thanks