-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
The documentation claims that the setter of the Snap.animate function accepts one number argument:
Line 97 in b365287
| - setter (function) caring function that accepts one number argument |
However, if an array is provided for from and to, the setter will also receive an array:
Lines 104 to 113 in b365287
| if (isArray(a.start)) { | |
| res = []; | |
| for (var j = 0, jj = a.start.length; j < jj; j++) { | |
| res[j] = +a.start[j] + | |
| (a.end[j] - a.start[j]) * a.easing(a.s); | |
| } | |
| } else { | |
| res = +a.start + (a.end - a.start) * a.easing(a.s); | |
| } | |
| a.set(res); |
This should be fixed in the documentation and afterwards then be applied to @types/snapsvg as well: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/snapsvg/index.d.ts#L41
Metadata
Metadata
Assignees
Labels
No labels