Skip to content

Commit ddeacb1

Browse files
committed
More code clean up.
1 parent caa5023 commit ddeacb1

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/path/Curve.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -798,12 +798,11 @@ statics: {
798798
// side-ways in tolerance based on orientation. This is needed e.g.
799799
// when touching the bottom tip of a circle.
800800
// Pass 1 for Curve.evaluate() type to calculate tangent
801-
if (x >= px + (flat ? -tolerance : tolerance * dir)) {
802-
// When touching a stationary point, only count it if we're
803-
// actuall on it.
804-
if (flat && (abs(t2) < tolerance && x != left[0]
805-
|| abs(t2 - 1) < tolerance && x != left[6]))
806-
continue;
801+
if (x >= px + (flat ? -tolerance : tolerance * dir)
802+
// When touching a stationary point, only count it if we're
803+
// actuall on it.
804+
&& !(flat && (abs(t2) < tolerance && x != left[0]
805+
|| abs(t2 - 1) < tolerance && x != left[6]))) {
807806
// If this is a horizontal stationary point, and we're at the
808807
// end of the curve (or at the beginning of a curve with
809808
// negative direction, as we're not actually flipping them),

0 commit comments

Comments
 (0)