1

(3 replies, posted in Bugs)

Here is the way that I understand it.  Before a node is expanded it's children do not exist in the DOM.  When you try and inject a node the following code is called.
_____________________________________________________

updateDOM: function(node, domNode){
    domNode= domNode||node.getDOM('node');
    var previous=node.getPrevious();
    if(previous){
        domNode.injectAfter(previous.getDOM('node'));
    }else{
        if(node.tree.forest && node.parentNode.isRoot()){
            var children=node.tree.wrapper.getElement('.mif-tree-children-root');
        }else{
            var children=node.parentNode.getDOM('children');
        }
        domNode.injectTop(children);
    }
}
_____________________________________________________

It is trying to get the DOM element of a node that does not exist in the DOM yet. (variable previous).  I'm going to look into this more to make sure that I am not making a mistake in the way I set up my mif-tree.

2

(3 replies, posted in Bugs)

I am experiencing the same error.

Hey,

Could you change Mif.Tree.Draw.getHTML to include the below span tag and class?  This allows me to highlight the node image and text like they do in vista.  Let me know what ya think. 

Thanks!

Will

Code: All i did was add a span tag with the class 'mif-tree-node-content-wrapper'

Mif.Tree.Draw.getHTML = function(node,html){
        var prefix=node.tree.DOMidPrefix;
        if($defined(node.state.checked)){
            if(!node.hasCheckbox) node.state.checked='nochecked';
            var checkbox='<span class="mif-tree-checkbox mif-tree-node-'+node.state.checked+'" uid="'+node.UID+'">'+Mif.Tree.Draw.zeroSpace+'</span>';
        }else{
            var checkbox='';
        }
        html=html||[];
        html.push(
        '<div class="mif-tree-node ',(node.isLast() ? 'mif-tree-node-last' : ''),'" id="',prefix,node.UID,'">',
            '<span class="mif-tree-node-wrapper ',node.cls,'" uid="',node.UID,'">',
                '<span class="mif-tree-gadjet mif-tree-gadjet-',node.getGadjetType(),'" uid="',node.UID,'">',Mif.Tree.Draw.zeroSpace,'</span>',
                '<span class="mif-tree-node-content-wrapper" uid="',node.UID,'">',
                    checkbox,
                    '<span class="mif-tree-icon ',node.closeIcon,'" uid="',node.UID,'">',Mif.Tree.Draw.zeroSpace,'</span>',
                    '<span class="mif-tree-name" uid="',node.UID,'">',node.name,'</span>',
                '</span>',
            '</span>',
            '<div class="mif-tree-children" style="display:none"></div>',
        '</div>'
        );
        return html;
    };

4

(2 replies, posted in Help)

I answered my own question.

The CSS line-height property is for the "Display" of the tree.  (how the browser will draw the tree)

The Mif.Tree.options.height value is so that your Javascript code understands how tall the nodes are.

Make sure these two numbers match when setting up your tree, or the node selection/highlighting will get all jacked.

5

(2 replies, posted in Help)

I could not figure out how to control the row height of the tree with the json object.

A working solution that I found was to change the line-height property in the .mif-tree-wrapper class in the CSS file.

What exactly is the Mif.Tree.options.height property used for?