src/util/freehand/FreehandLineFinder.js
/**
   * Finds all the lines close to the mouse point for a particular tool.
   * @private
   * @method
   *
   * @param {number} toolIndex The index of the particular freehand tool.
   * @returns {Object} An array of lines close to the mouse point.
   */
Finds all the lines close to the mouse point for a particular tool.
@private
@method

@param {number} toolIndex The index of the particular freehand tool.
@returns {Object} An array of lines close to the mouse point.
Finds all the lines close to the mouse point for a particular tool . @private @method @param { number } toolIndex The index of the particular freehand tool . @returns { Object } An array of lines close to the mouse point .
_getCloseLinesInTool(toolIndex) {
    const toolData = this._toolData;
    const points = toolData.data[toolIndex].handles.points;
    const closeLines = [];
    for (let i = 0; i < points.length; i++) {
      const nextIndex = FreehandLineFinder.getNextHandleIndex(i, points.length);
      const d = this._distanceOfPointfromLine(points[i], points[nextIndex]);
      if (d < distanceThreshold) {
        closeLines.push([i, nextIndex]);
      }
    }
    return closeLines;
  }
_getCloseLinesInTool ( toolIndex ) { const toolData = this . _toolData ; const points = toolData . data [ toolIndex ] . handles . points ; const closeLines = [ ] ; for ( let i = 0 ; i < points . length ; i ++ ) { const nextIndex = FreehandLineFinder . getNextHandleIndex ( i , points . length ) ; const d = this . _distanceOfPointfromLine ( points [ i ] , points [ nextIndex ] ) ; if ( d < distanceThreshold ) { closeLines . push ( [ i , nextIndex ] ) ; } } return closeLines ; }
Finds all the lines close to the mouse point for a particular tool.
Finds all the lines close to the mouse point for a particular tool .