function startDrawing(eventData) {
  var element = eventData.element;

  element.addEventListener(_events2.default.MOUSE_MOVE, mouseMoveCallback);

  var measurementData = createNewMeasurement();

  var config = freehand.getConfiguration();

  config.mouseLocation.handles.start.x = eventData.currentPoints.image.x;
  config.mouseLocation.handles.start.y = eventData.currentPoints.image.y;

  (0, _toolState.addToolState)(eventData.element, toolType, measurementData);

  var toolData = (0, _toolState.getToolState)(eventData.element, toolType);

  config.currentTool = toolData.data.length - 1;
}
/**
* Begining of drawing loop when tool is active and a click event happens far
* from existing handles.
*
* @param {Object} eventData - data object associated with an event.
*/
Begining of drawing loop when tool is active and a click event happens far
from existing handles.
Begining of drawing loop when tool is active and a click event happens far from existing handles .
function startDrawing(eventData) {
  var element = eventData.element;
  element.addEventListener(_events2.default.MOUSE_MOVE, mouseMoveCallback);
  var measurementData = createNewMeasurement();
  var config = freehand.getConfiguration();
  config.mouseLocation.handles.start.x = eventData.currentPoints.image.x;
  config.mouseLocation.handles.start.y = eventData.currentPoints.image.y;
  (0, _toolState.addToolState)(eventData.element, toolType, measurementData);
  var toolData = (0, _toolState.getToolState)(eventData.element, toolType);
  config.currentTool = toolData.data.length - 1;
}
function startDrawing ( eventData ) { var element = eventData . element ; element . addEventListener ( _events2 . default . MOUSE_MOVE , mouseMoveCallback ) ; var measurementData = createNewMeasurement ( ) ; var config = freehand . getConfiguration ( ) ; config . mouseLocation . handles . start . x = eventData . currentPoints . image . x ; config . mouseLocation . handles . start . y = eventData . currentPoints . image . y ; ( 0 , _toolState . addToolState ) ( eventData . element , toolType , measurementData ) ; var toolData = ( 0 , _toolState . getToolState ) ( eventData . element , toolType ) ; config . currentTool = toolData . data . length - 1 ; }
Begining of drawing loop when tool is active and a click event happens far
from existing handles.
Begining of drawing loop when tool is active and a click event happens far from existing handles .