From 9f93f6ee78324702d461323de958beb71d269a69 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 1 Jun 2016 14:38:44 +0200 Subject: [PATCH] Check for prevTime >= tMin and prevTime <= tMax Parameter scaling should only be done if the curve was actually split previously. This only happened if prevTime greater tMin and less tMax. --- src/path/PathItem.Boolean.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index b79b527b..32e5eb0b 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -245,9 +245,9 @@ PathItem.inject(new function() { if (curve !== prevCurve) { // This is a new curve, update noHandles setting. noHandles = !curve.hasHandles(); - } else if (prevTime > 0) { + } else if (prevTime >= tMin && prevTime <= tMax ) { // Scale parameter when we are splitting same curve multiple - // times, but avoid dividing by zero. + // times, but only if splitting was done previously. time /= prevTime; } if (time < tMin) {