lib/diagram/dependency2/builder.js
/**
   * Calculate position of diagram-elements.
   * @private
   */
Calculate position of diagram-elements.
@private
Calculate position of diagram - elements . @private
_calculateNodePosition() {
    for (let i = 0; i < this.nodesInNetworks.length; i++) {
      const nodes = this.nodesInNetworks[i] 
      if (nodes[0].x == null || nodes[0].y == null) {
        nodes[0].x = this.networkXPad1 + i * this.networkXPad2
        nodes[0].y = this.networkYPad
      }
      let v = 1
      for (let j = 1; j < nodes.length; j++) {
        if (!nodes[j].visible) {
          continue
        }
        nodes[j].x = nodes[0].x + this._indentOf(nodes[j]) * this.pXPad
        nodes[j].y = nodes[0].y + v * this.pYPad
        v++
      }
    }
  }
_calculateNodePosition ( ) { for ( let i = 0 ; i < this . nodesInNetworks . length ; i ++ ) { const nodes = this . nodesInNetworks [ i ] if ( nodes [ 0 ] . x == null || nodes [ 0 ] . y == null ) { nodes [ 0 ] . x = this . networkXPad1 + i * this . networkXPad2 nodes [ 0 ] . y = this . networkYPad } let v = 1 for ( let j = 1 ; j < nodes . length ; j ++ ) { if ( ! nodes [ j ] . visible ) { continue } nodes [ j ] . x = nodes [ 0 ] . x + this . _indentOf ( nodes [ j ] ) * this . pXPad nodes [ j ] . y = nodes [ 0 ] . y + v * this . pYPad v ++ } } }
Calculate position of diagram-elements.
Calculate position of diagram - elements .
// nodes in network[i] // initialize layer head position (layer head must be type==network)