Skip to forum content

Mif

— mystic javascript interface

You are not logged in. Please login or register.


Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields labelled (Required) must be completed before the form is submitted.

Required information for guests



Captcha image. Turn pictures on to see it.
Required information
Optional post settings

Topic review (newest first)

1

It works!... after i updated js libs properly. Sorry for my stupid questins, Moro. And thanks for your patience.

2

clear cache and try again

3

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

4

works for me. See Another add node demo

5

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?

6

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.

7

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?