It works!... after i updated js libs properly. Sorry for my stupid questins, Moro. And thanks for your patience.
All fields labelled (Required) must be completed before the form is submitted.
You are not logged in. Please login or register.
Mifjs forum — Mif.Tree, Mif.Menu » Help » adding nodes manually » Post new reply
All fields labelled (Required) must be completed before the form is submitted.
It works!... after i updated js libs properly. Sorry for my stupid questins, Moro. And thanks for your patience.
clear cache and try again
I'm sorry, but i see only "Add node" example there. After some debuging, i find that that Mif.Tree.Node constructor runs 2 times for node - once at the moment of creation and the second time when using add function. Every time it gets different UIDs.
I think its my mistake, a hope you tell me where i'm wrong
works for me. See Another add node demo
i'm very sorry, but I still have this problem. I think something wrong with
...this.UID...at the second time it returns the uid that cannot be found. I tried to change it manually in the debug(to value that was expected) and second node is drawn, but with extra vertical line from root node. Could you please help me to find out what is wrong?
because Tree::add first argument must be node options only, but not node. In latest rev (30) added support for node as first argument Tree::add function. So your example should work with latest rev.
Hello, Moro!
Could you please help me to find out where a'm wrong. I want to manually add some nodes, like this:
function formBranch(root){
if(root){
var newNode=new Mif.Tree.Node({
parentNode: root,
tree: tree2
}, {property:{name: 'node1'}});
tree2.add(newNode, root, 'inside');
var newNode2=new Mif.Tree.Node({
parentNode: newNode,
tree: tree2
}, {property:{name: 'node1.1'}});
tree2.add(newNode2, newNode, 'inside');
}
}first node (newNode) adds normally, but second doesn't. It falls in getDOM function. There after
var node=$(this.tree.DOMidPrefix+this.UID);node is still null. What do you think about it?
Mifjs forum — Mif.Tree, Mif.Menu » Help » adding nodes manually » Post new reply
Powered by PunBB