lib/diagram/nested/link-creator.js
/**
   * Grouping overlapped links, and identify its group as overlap-index.
   * @private
   */
Grouping overlapped links, and identify its group as overlap-index.
@private
Grouping overlapped links and identify its group as overlap - index . @private
_groupByOverlapLinks() {
    let overlapIndex = 0
    const overwriteIndex = {}
    this._forEachTpTpLink(0, (i, linkI) => {
      let oi = overlapIndex
      if (linkI.hasOverlapIndex()) {
        oi = linkI.overlapIndex
      } else {
        linkI.overlapIndex = overlapIndex
        overlapIndex++
      }
      this._forEachTpTpLink(i + 1, (j, linkJ) => {
        if (linkI.isOverlap(linkJ)) {
          if (linkJ.hasOverlapIndex() && oi !== linkJ.overlapIndex) {
            overwriteIndex[oi] = linkJ.overlapIndex
          }
          linkJ.overlapIndex = oi
        }
      })
    })
    this.links.forEach((link) => {
      if (link.overlapIndex in overwriteIndex) {
        link.overlapIndex = overwriteIndex[link.overlapIndex]
      }
    })
  }
_groupByOverlapLinks ( ) { let overlapIndex = 0 const overwriteIndex = { } this . _forEachTpTpLink ( 0 , ( i , linkI ) => { let oi = overlapIndex if ( linkI . hasOverlapIndex ( ) ) { oi = linkI . overlapIndex } else { linkI . overlapIndex = overlapIndex overlapIndex ++ } this . _forEachTpTpLink ( i + 1 , ( j , linkJ ) => { if ( linkI . isOverlap ( linkJ ) ) { if ( linkJ . hasOverlapIndex ( ) && oi !== linkJ . overlapIndex ) { overwriteIndex [ oi ] = linkJ . overlapIndex } linkJ . overlapIndex = oi } } ) } ) this . links . forEach ( ( link ) => { if ( link . overlapIndex in overwriteIndex ) { link . overlapIndex = overwriteIndex [ link . overlapIndex ] } } ) }
Grouping overlapped links, and identify its group as overlap-index.
Grouping overlapped links and identify its group as overlap - index .
// record overwriting of overlap-index (overlap group). // To set overlapIndex for last entry, counter:i must loop at last. // integrate indirect overlapped links. // write back overlap-index if overwrote.