src/util/freehand/FreehandLineFinder.js
/**
   * Finds the nearest handle to the mouse cursor for all tools.
   * @private
   * @method
   * @returns {Object} The handle closest to the point.
   */
Finds the nearest handle to the mouse cursor for all tools.
@private
@method
@returns {Object} The handle closest to the point.
Finds the nearest handle to the mouse cursor for all tools . @private @method @returns { Object } The handle closest to the point .
_nearestHandleToPointAllTools() {
    const toolData = this._toolData;
    let closestHandle = {
      toolIndex: null,
      handleIndex: null,
      distance: Infinity, 
    };
    for (let toolIndex = 0; toolIndex < toolData.data.length; toolIndex++) {
      const closestHandleForToolI = this._nearestHandleToPoint(toolIndex);
      if (closestHandleForToolI === null) {
        continue;
      }
      if (closestHandleForToolI.distance < closestHandle.distance) {
        closestHandle = closestHandleForToolI;
      }
    }
    return closestHandle;
  }
_nearestHandleToPointAllTools ( ) { const toolData = this . _toolData ; let closestHandle = { toolIndex : null , handleIndex : null , distance : Infinity , } ; for ( let toolIndex = 0 ; toolIndex < toolData . data . length ; toolIndex ++ ) { const closestHandleForToolI = this . _nearestHandleToPoint ( toolIndex ) ; if ( closestHandleForToolI === null ) { continue ; } if ( closestHandleForToolI . distance < closestHandle . distance ) { closestHandle = closestHandleForToolI ; } } return closestHandle ; }
Finds the nearest handle to the mouse cursor for all tools.
Finds the nearest handle to the mouse cursor for all tools .
// Some large number