Use GEOMETRIC_EPSILON tolerance when filtering out short curves.

Aligning with tolerances in the rest of the library.
This commit is contained in:
Jürg Lehni 2016-01-04 10:38:51 +01:00
parent daaf625ebd
commit 9127b13a01

View file

@ -1030,7 +1030,8 @@ var Path = PathItem.extend(/** @lends Path# */{
var curves = this.getCurves();
for (var i = curves.length - 1; i >= 0; i--) {
var curve = curves[i];
if (!curve.hasHandles() && (curve.getLength() === 0
if (!curve.hasHandles()
&& (curve.getLength() < /*#=*/Numerical.GEOMETRIC_EPSILON
|| curve.isCollinear(curve.getNext())))
curve.remove();
}