Revert "No need for special length handling in propagateWinding()"

This reverts commit 8c702ce5b4.
This commit is contained in:
Jürg Lehni 2015-10-21 09:35:17 +02:00
parent f8595e93c6
commit 7c37a4a4d2

View file

@ -367,7 +367,8 @@ PathItem.inject(new function() {
// contribution for the curve-chain starting with this segment. Once we
// have enough confidence in the winding contribution, we can propagate
// it until the next intersection or end of a curve chain.
var chain = [],
var epsilon = /*#=*/Numerical.GEOMETRIC_EPSILON,
chain = [],
start = segment,
totalLength = 0,
windingSum = 0;
@ -390,6 +391,10 @@ PathItem.inject(new function() {
var node = chain[k],
curveLength = node.length;
if (length <= curveLength) {
// If the selected location on the curve falls onto its
// beginning or end, use the curve's center instead.
if (length < epsilon || curveLength - length < epsilon)
length = curveLength / 2;
var curve = node.curve,
path = curve._path,
parent = path._parent,