From b23c272d6928b51a3a33db299f28b052d335c47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 6 Feb 2017 16:46:22 +0100 Subject: [PATCH] Minor code cleanup. --- src/path/PathItem.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/path/PathItem.js b/src/path/PathItem.js index 8bfeeb09..33d1a126 100644 --- a/src/path/PathItem.js +++ b/src/path/PathItem.js @@ -330,12 +330,11 @@ var PathItem = Item.extend(/** @lends PathItem# */{ : (_matrix || path._matrix)._orNullIfIdentity(); // First check the bounds of the two paths. If they don't intersect, // we don't need to iterate through their curves. - if (!self && !this.getBounds(matrix1).touches(path.getBounds(matrix2))) - return []; - var curves1 = this.getCurves(), - curves2 = !self && path.getCurves(); - return Curve.getCurvesIntersections(curves1, curves2, include, - matrix1, matrix2, _returnFirst); + return self || this.getBounds(matrix1).touches(path.getBounds(matrix2)) + ? Curve.getCurvesIntersections( + this.getCurves(), !self && path.getCurves(), include, + matrix1, matrix2, _returnFirst) + : []; }, /**