nl_tokens: / * Constructs an adjacency graph using the nodes and edges specified through config . For each node and edge we add a property dagre that contains an object that will hold intermediate and final layout information . Some of the contents include :
pl_tokens: function initLayoutGraph ( inputGraph ) { var g = new CDigraph ( ) ; inputGraph . eachNode ( function ( u , value ) { if ( value === undefined ) value = { } ; g . addNode ( u , { width : value . width , <mask> : value . height } ) ; if ( value . hasOwnProperty ( 'rank' ) ) { g . node ( u ) . prefRank = value . rank ; } } ) ; // Set up subgraphs if ( inputGraph . parent ) { inputGraph . nodes ( ) . forEach ( function ( u ) { g . parent ( u , inputGraph . parent ( u ) ) ; } ) ; } inputGraph . eachEdge ( function ( e , u , v , value ) { if ( value === undefined ) value = { } ; var newValue = { e : e , minLen : value . minLen || 1 , width : value . width || 0 , height : value . height || 0 , points : [ ] } ; g . addEdge ( null , u , v , newValue ) ; } ) ; // Initial graph attributes var graphValue = inputGraph . graph ( ) || { } ; g . graph ( { rankDir : graphValue . rankDir || config . rankDir } ) ; return g ; }