mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Use GEOMETRIC_EPSILON tolerance when filtering out short curves.
Aligning with tolerances in the rest of the library.
This commit is contained in:
parent
daaf625ebd
commit
9127b13a01
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue