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.
This commit is contained in:
Jan 2016-06-01 14:38:44 +02:00
parent f19d0c8134
commit 9f93f6ee78

View file

@ -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) {