plugins/incub/visualizer/old/src/js/demo_vivagraph.js
function loadChildNodes(parentNode){
    if (gNodesWithChildren[parentNode._id]){
        var children = [];
        for (var i = 0; i < gNodesWithChildren[parentNode._id].length; ++i){
            var currentNode = gNodesWithChildren[parentNode._id][i];
            children.push({
                _id : currentNode._id, //todo : id instead of name?
                node : currentNode,
                parent : parentNode._id, //todo id instead of name?
                childNodes : loadChildNodes(currentNode)
            });
        }
        return children;
    }
}
function loadChildNodes(parentNode){
    if (gNodesWithChildren[parentNode._id]){
        var children = [];
        for (var i = 0; i < gNodesWithChildren[parentNode._id].length; ++i){
            var currentNode = gNodesWithChildren[parentNode._id][i];
            children.push({
                _id : currentNode._id, //todo : id instead of name?
                node : currentNode,
                parent : parentNode._id, //todo id instead of name?
                childNodes : loadChildNodes(currentNode)
            });
        }
        return children;
    }
}
function loadChildNodes ( parentNode ) { if ( gNodesWithChildren [ parentNode . _id ] ) { var children = [ ] ; for ( var i = 0 ; i < gNodesWithChildren [ parentNode . _id ] . length ; ++ i ) { var currentNode = gNodesWithChildren [ parentNode . _id ] [ i ] ; children . push ( { _id : currentNode . _id , //todo : id instead of name? node : currentNode , parent : parentNode . _id , //todo id instead of name? childNodes : loadChildNodes ( currentNode ) } ) ; } return children ; } }
Returns the nodes children of the node in parameter
@param parentNode
@returns {Array}
Returns the nodes children of the node in parameter