src/util/freehand/FreehandLineFinder.js
/**
   * Finds the line the user clicked on from an array of close lines.\
   * @private
   * @method
   *
   * @param {number} toolIndex The index of the particular freehand tool.
   * @param {Object} closeLines An array of lines close to the mouse point.
   * @returns {ClickedLineData|null} An instance of ClickedLineData containing information about the line, or null if no line is correct.
   */
Finds the line the user clicked on from an array of close lines.\
@private
@method

@param {number} toolIndex The index of the particular freehand tool.
@param {Object} closeLines An array of lines close to the mouse point.
@returns {ClickedLineData|null} An instance of ClickedLineData containing information about the line, or null if no line is correct.
Finds the line the user clicked on from an array of close lines . \ @private @method @param { number } toolIndex The index of the particular freehand tool . @param { Object } closeLines An array of lines close to the mouse point . @returns { ClickedLineData|null } An instance of ClickedLineData containing information about the line or null if no line is correct .
_findCorrectLine(toolIndex, closeLines) {
    for (let i = 0; i < closeLines.length; i++) {
      if (this._pointProjectsToLineSegment(toolIndex, closeLines[i])) {
        return new ClickedLineData(toolIndex, closeLines[i]);
      }
    }
    return null;
  }
_findCorrectLine ( toolIndex , closeLines ) { for ( let i = 0 ; i < closeLines . length ; i ++ ) { if ( this . _pointProjectsToLineSegment ( toolIndex , closeLines [ i ] ) ) { return new ClickedLineData ( toolIndex , closeLines [ i ] ) ; } } return null ; }
Finds the line the user clicked on from an array of close lines.\
 @private
 @method
Finds the line the user clicked on from an array of close lines . \ @private @method
// Test if any candidate lines can be projected onto by the mousePoint // No valid line found