mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Merge pull request #1060 from iconexperience/patch-3
Check for prevTime >= tMin and prevTime <= tMax
This commit is contained in:
commit
719392dd2c
1 changed files with 2 additions and 2 deletions
|
@ -245,9 +245,9 @@ PathItem.inject(new function() {
|
||||||
if (curve !== prevCurve) {
|
if (curve !== prevCurve) {
|
||||||
// This is a new curve, update noHandles setting.
|
// This is a new curve, update noHandles setting.
|
||||||
noHandles = !curve.hasHandles();
|
noHandles = !curve.hasHandles();
|
||||||
} else if (prevTime > 0) {
|
} else if (prevTime >= tMin && prevTime <= tMax ) {
|
||||||
// Scale parameter when we are splitting same curve multiple
|
// 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;
|
time /= prevTime;
|
||||||
}
|
}
|
||||||
if (time < tMin) {
|
if (time < tMin) {
|
||||||
|
|
Loading…
Reference in a new issue