function dragHandle(currentHandle, data) {
  var config = _freehand.freehand.getConfiguration();
  var handleIndex = -1;

  data.handles.invalidHandlePlacement = _freeHandIntersect2.default.modify(data.handles, currentHandle);
  data.active = true;
  data.highlight = true;
  data.handles[currentHandle].x = config.mouseLocation.handles.start.x;
  data.handles[currentHandle].y = config.mouseLocation.handles.start.y;

  if (currentHandle === 0) {
    handleIndex = data.handles.length - 1;
  } else {
    handleIndex = currentHandle - 1;
  }

  if (currentHandle >= 0) {
    var lastLineIndex = data.handles[handleIndex].lines.length - 1;
    var lastLine = data.handles[handleIndex].lines[lastLineIndex];

    lastLine.x = config.mouseLocation.handles.start.x;
    lastLine.y = config.mouseLocation.handles.start.y;
  }
}
/**
* Moves a part of the freehand tool whilst it is dragged by the mouse.
*
* @param {Object} currentHandle - The handle being dragged.
* @param {Object} data - The data associated with the freehand tool being modified.
* @modifies {currentHandle|data}
*/
Moves a part of the freehand tool whilst it is dragged by the mouse.
Moves a part of the freehand tool whilst it is dragged by the mouse .
function dragHandle(currentHandle, data) {
  var config = _freehand.freehand.getConfiguration();
  var handleIndex = -1;
  data.handles.invalidHandlePlacement = _freeHandIntersect2.default.modify(data.handles, currentHandle);
  data.active = true;
  data.highlight = true;
  data.handles[currentHandle].x = config.mouseLocation.handles.start.x;
  data.handles[currentHandle].y = config.mouseLocation.handles.start.y;
  if (currentHandle === 0) {
    handleIndex = data.handles.length - 1;
  } else {
    handleIndex = currentHandle - 1;
  }
  if (currentHandle >= 0) {
    var lastLineIndex = data.handles[handleIndex].lines.length - 1;
    var lastLine = data.handles[handleIndex].lines[lastLineIndex];
    lastLine.x = config.mouseLocation.handles.start.x;
    lastLine.y = config.mouseLocation.handles.start.y;
  }
}
function dragHandle ( currentHandle , data ) { var config = _freehand . freehand . getConfiguration ( ) ; var handleIndex = - 1 ; data . handles . invalidHandlePlacement = _freeHandIntersect2 . default . modify ( data . handles , currentHandle ) ; data . active = true ; data . highlight = true ; data . handles [ currentHandle ] . x = config . mouseLocation . handles . start . x ; data . handles [ currentHandle ] . y = config . mouseLocation . handles . start . y ; if ( currentHandle === 0 ) { handleIndex = data . handles . length - 1 ; } else { handleIndex = currentHandle - 1 ; } if ( currentHandle >= 0 ) { var lastLineIndex = data . handles [ handleIndex ] . lines . length - 1 ; var lastLine = data . handles [ handleIndex ] . lines [ lastLineIndex ] ; lastLine . x = config . mouseLocation . handles . start . x ; lastLine . y = config . mouseLocation . handles . start . y ; } }
Moves a part of the freehand tool whilst it is dragged by the mouse.
Moves a part of the freehand tool whilst it is dragged by the mouse .