lib/diagram/dependency2/builder.js
/**
   * Make labels of diagram elements.
   * @private
   */
Make labels of diagram elements.
@private
Make labels of diagram elements . @private
_makeNodeLabels() {
    const updatedEntries = this.rootSVGGroupSelection
      .selectAll('text.dep2')
      .data(this._allVisibleNodes())
    const enteredEntries = updatedEntries.enter().append('text')
    updatedEntries.exit().remove()
    const targetEntries = enteredEntries.merge(updatedEntries)
    targetEntries
      .attr('class', (d) => this.classStringFrom(d, `dep2 ${d.type}`))
      .attr('id', (d) => `${d.path}-lb`)
      .attr('x', (d) => d.x + 2 * this.pR + this.labelXPad)
      .attr('y', (d) => d.y + this.fontSize)
      .attr('font-size', this.fontSize)
      .text((d) => d.name)
  }
_makeNodeLabels ( ) { const updatedEntries = this . rootSVGGroupSelection . selectAll ( 'text.dep2' ) . data ( this . _allVisibleNodes ( ) ) const enteredEntries = updatedEntries . enter ( ) . append ( 'text' ) updatedEntries . exit ( ) . remove ( ) const targetEntries = enteredEntries . merge ( updatedEntries ) targetEntries . attr ( 'class' , ( d ) => this . classStringFrom ( d , ` ${ d . type } ` ) ) . attr ( 'id' , ( d ) => ` ${ d . path } ` ) . attr ( 'x' , ( d ) => d . x + 2 * this . pR + this . labelXPad ) . attr ( 'y' , ( d ) => d . y + this . fontSize ) . attr ( 'font-size' , this . fontSize ) . text ( ( d ) => d . name ) }
Make labels of diagram elements.
Make labels of diagram elements .