function newHandle(candidateHandle, dataHandles) {
  // Check if the proposed line will intersect any existent line
  var lastHandleId = dataHandles.length - 1;
  var lastHandle = getCoords(dataHandles[lastHandleId]);
  var newHandle = getCoords(candidateHandle);

  return doesIntersectOtherLines(dataHandles, lastHandle, newHandle, [lastHandleId]);
}
/**
* Determines whether a new handle causes an intersection of the lines of the polygon.
*
* @param {Object} candidateHandle - The new handle to check.
* @param {Object} dataHandles - data object associated with the tool.
* @return {Boolean} - Whether the new line intersects with any other lines of the polygon.
*/
Determines whether a new handle causes an intersection of the lines of the polygon.
Determines whether a new handle causes an intersection of the lines of the polygon .
function newHandle(candidateHandle, dataHandles) {
  var lastHandleId = dataHandles.length - 1;
  var lastHandle = getCoords(dataHandles[lastHandleId]);
  var newHandle = getCoords(candidateHandle);
  return doesIntersectOtherLines(dataHandles, lastHandle, newHandle, [lastHandleId]);
}
function newHandle ( candidateHandle , dataHandles ) { var lastHandleId = dataHandles . length - 1 ; var lastHandle = getCoords ( dataHandles [ lastHandleId ] ) ; var newHandle = getCoords ( candidateHandle ) ; return doesIntersectOtherLines ( dataHandles , lastHandle , newHandle , [ lastHandleId ] ) ; }
Determines whether a new handle causes an intersection of the lines of the polygon.
Determines whether a new handle causes an intersection of the lines of the polygon .
// Check if the proposed line will intersect any existent line