function dropHandle(eventData, toolData) {
  var config = _freehand.freehand.getConfiguration();
  var currentTool = config.currentTool;

  var dataHandles = toolData.data[currentTool].handles;

  // Don't allow the line being modified to intersect other lines
  if (dataHandles.invalidHandlePlacement) {
    var currentHandle = config.currentHandle;
    var currentHandleData = dataHandles[currentHandle];
    var previousHandleData = void 0;

    if (currentHandle === 0) {
      var lastHandleID = dataHandles.length - 1;

      previousHandleData = dataHandles[lastHandleID];
    } else {
      previousHandleData = dataHandles[currentHandle - 1];
    }

    // Snap back to previous position
    currentHandleData.x = config.dragOrigin.x;
    currentHandleData.y = config.dragOrigin.y;
    previousHandleData.lines[0] = currentHandleData;

    dataHandles.invalidHandlePlacement = false;
  }
}
/**
* Places part of the freehand tool when the mouse button is released.
*
* @param {Object} e - The event.
* @param {Object} toolData - The data associated with the freehand tool.
* @modifies {toolData}
*/
Places part of the freehand tool when the mouse button is released.
Places part of the freehand tool when the mouse button is released .
function dropHandle(eventData, toolData) {
  var config = _freehand.freehand.getConfiguration();
  var currentTool = config.currentTool;
  var dataHandles = toolData.data[currentTool].handles;
  if (dataHandles.invalidHandlePlacement) {
    var currentHandle = config.currentHandle;
    var currentHandleData = dataHandles[currentHandle];
    var previousHandleData = void 0;
    if (currentHandle === 0) {
      var lastHandleID = dataHandles.length - 1;
      previousHandleData = dataHandles[lastHandleID];
    } else {
      previousHandleData = dataHandles[currentHandle - 1];
    }
    currentHandleData.x = config.dragOrigin.x;
    currentHandleData.y = config.dragOrigin.y;
    previousHandleData.lines[0] = currentHandleData;
    dataHandles.invalidHandlePlacement = false;
  }
}
function dropHandle ( eventData , toolData ) { var config = _freehand . freehand . getConfiguration ( ) ; var currentTool = config . currentTool ; var dataHandles = toolData . data [ currentTool ] . handles ; if ( dataHandles . invalidHandlePlacement ) { var currentHandle = config . currentHandle ; var currentHandleData = dataHandles [ currentHandle ] ; var previousHandleData = void 0 ; if ( currentHandle === 0 ) { var lastHandleID = dataHandles . length - 1 ; previousHandleData = dataHandles [ lastHandleID ] ; } else { previousHandleData = dataHandles [ currentHandle - 1 ] ; } currentHandleData . x = config . dragOrigin . x ; currentHandleData . y = config . dragOrigin . y ; previousHandleData . lines [ 0 ] = currentHandleData ; dataHandles . invalidHandlePlacement = false ; } }
Places part of the freehand tool when the mouse button is released.
Places part of the freehand tool when the mouse button is released .
// Don't allow the line being modified to intersect other lines // Snap back to previous position