@turf/boolean-crosses
Advanced tools
Comparing version 6.3.0 to 6.4.0
@@ -5,3 +5,3 @@ import lineIntersect from "@turf/line-intersect"; | ||
import { getGeom } from "@turf/invariant"; | ||
import { point } from "@turf/helpers"; | ||
import { point, } from "@turf/helpers"; | ||
/** | ||
@@ -114,6 +114,5 @@ * Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than | ||
var foundExtPoint = false; | ||
var pointLength = multiPoint.coordinates[0].length; | ||
var i = 0; | ||
while (i < pointLength && foundIntPoint && foundExtPoint) { | ||
if (booleanPointInPolygon(point(multiPoint.coordinates[0][i]), polygon)) { | ||
var pointLength = multiPoint.coordinates.length; | ||
for (var i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) { | ||
if (booleanPointInPolygon(point(multiPoint.coordinates[i]), polygon)) { | ||
foundIntPoint = true; | ||
@@ -124,5 +123,4 @@ } | ||
} | ||
i++; | ||
} | ||
return foundExtPoint && foundExtPoint; | ||
return foundExtPoint && foundIntPoint; | ||
} | ||
@@ -129,0 +127,0 @@ /** |
@@ -118,6 +118,5 @@ "use strict"; | ||
var foundExtPoint = false; | ||
var pointLength = multiPoint.coordinates[0].length; | ||
var i = 0; | ||
while (i < pointLength && foundIntPoint && foundExtPoint) { | ||
if (boolean_point_in_polygon_1.default(helpers_1.point(multiPoint.coordinates[0][i]), polygon)) { | ||
var pointLength = multiPoint.coordinates.length; | ||
for (var i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) { | ||
if (boolean_point_in_polygon_1.default(helpers_1.point(multiPoint.coordinates[i]), polygon)) { | ||
foundIntPoint = true; | ||
@@ -128,5 +127,4 @@ } | ||
} | ||
i++; | ||
} | ||
return foundExtPoint && foundExtPoint; | ||
return foundExtPoint && foundIntPoint; | ||
} | ||
@@ -133,0 +131,0 @@ /** |
{ | ||
"name": "@turf/boolean-crosses", | ||
"version": "6.3.0", | ||
"version": "6.4.0", | ||
"description": "turf boolean-crosses module", | ||
@@ -64,9 +64,9 @@ "author": "Turf Authors", | ||
"dependencies": { | ||
"@turf/boolean-point-in-polygon": "^6.3.0", | ||
"@turf/helpers": "^6.3.0", | ||
"@turf/invariant": "^6.3.0", | ||
"@turf/line-intersect": "^6.3.0", | ||
"@turf/polygon-to-line": "^6.3.0" | ||
"@turf/boolean-point-in-polygon": "^6.4.0", | ||
"@turf/helpers": "^6.4.0", | ||
"@turf/invariant": "^6.4.0", | ||
"@turf/line-intersect": "^6.4.0", | ||
"@turf/polygon-to-line": "^6.4.0" | ||
}, | ||
"gitHead": "57c8877e1e2d67effc2cdd23385c02b2a6615a49" | ||
"gitHead": "1e62773cfc88c627cca8effcb5c14cfb65a905ac" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19505
358
1
Updated@turf/helpers@^6.4.0
Updated@turf/invariant@^6.4.0
Updated@turf/line-intersect@^6.4.0
Updated@turf/polygon-to-line@^6.4.0