addon/utils/graph-view.js
function _createPathData(d) {
  var sX = d.source.y,
      sY = d.source.x,
      tX = d.target.y,
      tY = d.target.x,
      mX = (sX + tX)/2,
      mY = (sY + tY)/2,

      sH = Math.abs(sX - tX) * 0.35,
      sV = 0; // strength

  if(d.isBackwardLink) {
    if(sY === tY) {
      sV = 45;
      mY -= 50;
      if(sX === tX) {
        sX += _layout.linkDelta;
        tX -= _layout.linkDelta;
      }
    }
    sH = Math.abs(sX - tX) * 1.1;
  }

  return _layout.pathFormatter(
    sX, sY,

    sX + sH, sY - sV,
    mX, mY,

    tX - sH, tY - sV,
    tX, tY
  );
}
function _createPathData(d) {
  var sX = d.source.y,
      sY = d.source.x,
      tX = d.target.y,
      tY = d.target.x,
      mX = (sX + tX)/2,
      mY = (sY + tY)/2,

      sH = Math.abs(sX - tX) * 0.35,
      sV = 0; // strength

  if(d.isBackwardLink) {
    if(sY === tY) {
      sV = 45;
      mY -= 50;
      if(sX === tX) {
        sX += _layout.linkDelta;
        tX -= _layout.linkDelta;
      }
    }
    sH = Math.abs(sX - tX) * 1.1;
  }

  return _layout.pathFormatter(
    sX, sY,

    sX + sH, sY - sV,
    mX, mY,

    tX - sH, tY - sV,
    tX, tY
  );
}
function _createPathData ( d ) { var sX = d . source . y , sY = d . source . x , tX = d . target . y , tY = d . target . x , mX = ( sX + tX ) / 2 , mY = ( sY + tY ) / 2 , sH = Math . abs ( sX - tX ) * 0.35 , sV = 0 ; // strength if ( d . isBackwardLink ) { if ( sY === tY ) { sV = 45 ; mY -= 50 ; if ( sX === tX ) { sX += _layout . linkDelta ; tX -= _layout . linkDelta ; } } sH = Math . abs ( sX - tX ) * 1.1 ; } return _layout . pathFormatter ( sX , sY , sX + sH , sY - sV , mX , mY , tX - sH , tY - sV , tX , tY ) ; }
Creates a path data string for the given link. Google SVG path data to learn what it is.
@param d {Object} Must contain source and target properties with the start and end positions.
@return pathData {String} Path data string based on the current layout
Creates a path data string for the given link . Google SVG path data to learn what it is .