mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
No need for special length handling in propagateWinding()
This commit is contained in:
parent
3daa7f78b4
commit
8c702ce5b4
1 changed files with 1 additions and 6 deletions
|
@ -366,8 +366,7 @@ 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 epsilon = /*#=*/Numerical.GEOMETRIC_EPSILON,
|
||||
chain = [],
|
||||
var chain = [],
|
||||
start = segment,
|
||||
totalLength = 0,
|
||||
windingSum = 0;
|
||||
|
@ -390,10 +389,6 @@ 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,
|
||||
|
|
Loading…
Reference in a new issue