preview/vendor/leaflet.draw-src.js
function (p, p1, maxIndex, minIndex) {
		var points = this._originalPoints,
			p2, p3;

		minIndex = minIndex || 0;

		// Check all previous line segments (beside the immediately previous) for intersections
		for (var j = maxIndex; j > minIndex; j--) {
			p2 = points[j - 1];
			p3 = points[j];

			if (L.LineUtil.segmentsIntersect(p, p1, p2, p3)) {
				return true;
			}
		}

		return false;
	}
function (p, p1, maxIndex, minIndex) {
		var points = this._originalPoints,
			p2, p3;

		minIndex = minIndex || 0;

		// Check all previous line segments (beside the immediately previous) for intersections
		for (var j = maxIndex; j > minIndex; j--) {
			p2 = points[j - 1];
			p3 = points[j];

			if (L.LineUtil.segmentsIntersect(p, p1, p2, p3)) {
				return true;
			}
		}

		return false;
	}
function ( p , p1 , maxIndex , minIndex ) { var points = this . _originalPoints , p2 , p3 ; minIndex = minIndex || 0 ; // Check all previous line segments (beside the immediately previous) for intersections for ( var j = maxIndex ; j > minIndex ; j -- ) { p2 = points [ j - 1 ] ; p3 = points [ j ] ; if ( L . LineUtil . segmentsIntersect ( p , p1 , p2 , p3 ) ) { return true ; } } return false ; }
Checks a line segment intersections with any line segments before its predecessor. Don't need to check the predecessor as will never intersect.
Checks a line segment intersections with any line segments before its predecessor . Don t need to check the predecessor as will never intersect .