function end(dataHandles) {
  var lastHandleId = dataHandles.length - 1;
  var lastHandle = getCoords(dataHandles[lastHandleId]);
  var firstHandle = getCoords(dataHandles[0]);

  return doesIntersectOtherLines(dataHandles, lastHandle, firstHandle, [lastHandleId, 0]);
}
/**
* Checks if the last line of a polygon will intersect the other lines of the polgyon.
*
* @param {Object} dataHandles - data object associated with the tool.
* @return {Boolean} - Whether the last line intersects with any other lines of the polygon.
*/
Checks if the last line of a polygon will intersect the other lines of the polgyon.
Checks if the last line of a polygon will intersect the other lines of the polgyon .
function end(dataHandles) {
  var lastHandleId = dataHandles.length - 1;
  var lastHandle = getCoords(dataHandles[lastHandleId]);
  var firstHandle = getCoords(dataHandles[0]);
  return doesIntersectOtherLines(dataHandles, lastHandle, firstHandle, [lastHandleId, 0]);
}
function end ( dataHandles ) { var lastHandleId = dataHandles . length - 1 ; var lastHandle = getCoords ( dataHandles [ lastHandleId ] ) ; var firstHandle = getCoords ( dataHandles [ 0 ] ) ; return doesIntersectOtherLines ( dataHandles , lastHandle , firstHandle , [ lastHandleId , 0 ] ) ; }
Checks if the last line of a polygon will intersect the other lines of the polgyon.
Checks if the last line of a polygon will intersect the other lines of the polgyon .