@turf/line-slice
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -73,8 +73,8 @@ var linestring = require('@turf/helpers').lineString; | ||
} | ||
var clipLine = linestring([ends[0].geometry.coordinates], {}); | ||
var clipCoords = [ends[0].geometry.coordinates]; | ||
for (var i = ends[0].properties.index + 1; i < ends[1].properties.index + 1; i++) { | ||
clipLine.geometry.coordinates.push(coords[i]); | ||
clipCoords.push(coords[i]); | ||
} | ||
clipLine.geometry.coordinates.push(ends[1].geometry.coordinates); | ||
return clipLine; | ||
clipCoords.push(ends[1].geometry.coordinates); | ||
return linestring(clipCoords, line.properties); | ||
}; |
{ | ||
"name": "@turf/line-slice", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "turf line-slice module", | ||
@@ -35,5 +35,5 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@turf/helpers": "^4.2.0", | ||
"@turf/truncate": "^4.2.0", | ||
"benchmark": "^1.0.0", | ||
"@turf/helpers": "^4.3.0", | ||
"@turf/truncate": "^4.3.0", | ||
"benchmark": "^2.1.4", | ||
"eslint": "^3.16.1", | ||
@@ -43,12 +43,12 @@ "eslint-config-mourner": "^2.0.1", | ||
"mkdirp": "^0.5.1", | ||
"tape": "^3.5.0", | ||
"tape": "^4.6.3", | ||
"write-json-file": "^2.0.0" | ||
}, | ||
"dependencies": { | ||
"@turf/bearing": "^4.2.0", | ||
"@turf/destination": "^4.2.0", | ||
"@turf/distance": "^4.2.0", | ||
"@turf/helpers": "^4.2.0", | ||
"@turf/point-on-line": "^4.2.0" | ||
"@turf/bearing": "^4.3.0", | ||
"@turf/destination": "^4.3.0", | ||
"@turf/distance": "^4.3.0", | ||
"@turf/helpers": "^4.3.0", | ||
"@turf/point-on-line": "^4.3.0" | ||
} | ||
} |
7359
Updated@turf/bearing@^4.3.0
Updated@turf/destination@^4.3.0
Updated@turf/distance@^4.3.0
Updated@turf/helpers@^4.3.0
Updated@turf/point-on-line@^4.3.0