server/graph/common/neighbor-maker.js
/**
   * Mark neighbor relation of target node.
   * @param {string} targetNodeName - Name of target node/term-point.
   * @param {string} targetNodeLayer - Name of layer that contains the target.
   * @returns {boolean} True if found target and marked neighbors of it.
   */
Mark neighbor relation of target node.
@param {string} targetNodeName - Name of target node/term-point.
@param {string} targetNodeLayer - Name of layer that contains the target.
@returns {boolean} True if found target and marked neighbors of it.
Mark neighbor relation of target node . @param { string } targetNodeName - Name of target node / term - point . @param { string } targetNodeLayer - Name of layer that contains the target . @returns { boolean } True if found target and marked neighbors of it .
markNeighborWithTarget(targetNodeName, targetNodeLayer) {
    const targetNode = this.findTargetNode(targetNodeName, targetNodeLayer)
    if (!targetNode) {
      this.consoleDebug(
        0,
        'markNeighborWT',
        `target: ${targetNodeName} (in layer: ${targetNodeLayer}) not found`
      )
      return false
    }
    const targetLinks = this._findAllTpTpLinksInLayerOf(targetNode)
    targetNode.neighbor = new NeighborRelation(0)
    this._markNeighbor(targetNode, targetLinks, 1)
    return true
  }
markNeighborWithTarget ( targetNodeName , targetNodeLayer ) { const targetNode = this . findTargetNode ( targetNodeName , targetNodeLayer ) if ( ! targetNode ) { this . consoleDebug ( 0 , 'markNeighborWT' , ` ${ targetNodeName } ${ targetNodeLayer } ` ) return false } const targetLinks = this . _findAllTpTpLinksInLayerOf ( targetNode ) targetNode . neighbor = new NeighborRelation ( 0 ) this . _markNeighbor ( targetNode , targetLinks , 1 ) return true }
Mark neighbor relation of target node.
Mark neighbor relation of target node .
// TODO: when targetNodeName is term-point? // check // console.log(targetLinks.map(d => d.path)) // console.log(`total links: ${targetLinks.length}`)