lib/diagram/nested/operator.js
/**
   * Set event handler to term-point circles/labels.
   * @private
   */
Set event handler to term-point circles/labels.
@private
Set event handler to term - point circles / labels . @private
_setTpMouseHandler() {
    const linksHasTp = (tp) => {
      return this.topologyData.links.filter((link) => {
        return link.sourcePath === tp.path || link.targetPath === tp.path
      })
    }
    const tpCircleHighlight = (event, d, className) => {
      this.tooltip.enableTooltip(event, d)
      className === 'checked' && this._clearAllChecked()
      const links = linksHasTp(d)
      if (links.length > 0) {
        links.forEach((link) => this._setLineClass(link, className))
      } else {
        this._setTpClassByPath(d.path, className)
      }
    }
    const tpMouseOut = () => {
      this.tooltip.disableTooltip()
      this._clearAllSelectReady()
    }
    const tps = [this._selectTpCircleByPath(), this._selectTpLabelByPath()]
    tps.forEach((target) => {
      target
        .on('click', (event, d) => tpCircleHighlight(event, d, 'checked'))
        .on('mouseover', (event, d) =>
          tpCircleHighlight(event, d, 'select-ready')
        )
        .on('mouseout', tpMouseOut)
    })
  }
_setTpMouseHandler ( ) { const linksHasTp = ( tp ) => { return this . topologyData . links . filter ( ( link ) => { return link . sourcePath === tp . path || link . targetPath === tp . path } ) } const tpCircleHighlight = ( event , d , className ) => { this . tooltip . enableTooltip ( event , d ) className === 'checked' && this . _clearAllChecked ( ) const links = linksHasTp ( d ) if ( links . length > 0 ) { links . forEach ( ( link ) => this . _setLineClass ( link , className ) ) } else { this . _setTpClassByPath ( d . path , className ) } } const tpMouseOut = ( ) => { this . tooltip . disableTooltip ( ) this . _clearAllSelectReady ( ) } const tps = [ this . _selectTpCircleByPath ( ) , this . _selectTpLabelByPath ( ) ] tps . forEach ( ( target ) => { target . on ( 'click' , ( event , d ) => tpCircleHighlight ( event , d , 'checked' ) ) . on ( 'mouseover' , ( event , d ) => tpCircleHighlight ( event , d , 'select-ready' ) ) . on ( 'mouseout' , tpMouseOut ) } ) }
Set event handler to term-point circles/labels.
Set event handler to term - point circles / labels .
// tp without link (tp that has link-ref-count 0)