function mouseDownActive(e, toolData, currentTool) {
  var eventData = e.detail;
  var config = freehand.getConfiguration();
  var element = eventData.element;
  var data = toolData.data[currentTool];
  var coords = eventData.currentPoints.canvas;
  var handleNearby = pointNearHandle(element, data, coords);

  if (!_freeHandIntersect2.default.end(data.handles) && data.canComplete) {
    var lastHandlePlaced = config.currentHandle;

    endDrawing(eventData, lastHandlePlaced);
  } else if (handleNearby === null) {
    addPoint(eventData);
  }

  e.preventDefault();
  e.stopPropagation();

  return;
}
/**
* Event handler called by mouseDownCallback when the tool is currently active.
*
* @param {Object} e - The event.
* @param {Object} toolData - The data object associated with the freehand tool.
* @param {Number} currentTool - The ID of the active freehand polygon.
*/
Event handler called by mouseDownCallback when the tool is currently active.
Event handler called by mouseDownCallback when the tool is currently active .
function mouseDownActive(e, toolData, currentTool) {
  var eventData = e.detail;
  var config = freehand.getConfiguration();
  var element = eventData.element;
  var data = toolData.data[currentTool];
  var coords = eventData.currentPoints.canvas;
  var handleNearby = pointNearHandle(element, data, coords);
  if (!_freeHandIntersect2.default.end(data.handles) && data.canComplete) {
    var lastHandlePlaced = config.currentHandle;
    endDrawing(eventData, lastHandlePlaced);
  } else if (handleNearby === null) {
    addPoint(eventData);
  }
  e.preventDefault();
  e.stopPropagation();
  return;
}
function mouseDownActive ( e , toolData , currentTool ) { var eventData = e . detail ; var config = freehand . getConfiguration ( ) ; var element = eventData . element ; var data = toolData . data [ currentTool ] ; var coords = eventData . currentPoints . canvas ; var handleNearby = pointNearHandle ( element , data , coords ) ; if ( ! _freeHandIntersect2 . default . end ( data . handles ) && data . canComplete ) { var lastHandlePlaced = config . currentHandle ; endDrawing ( eventData , lastHandlePlaced ) ; } else if ( handleNearby === null ) { addPoint ( eventData ) ; } e . preventDefault ( ) ; e . stopPropagation ( ) ; return ; }
Event handler called by mouseDownCallback when the tool is currently active.
Event handler called by mouseDownCallback when the tool is currently active .