diff --git a/src/internal/animations.js b/src/internal/animations.js index fcbfba7521..ac14036724 100644 --- a/src/internal/animations.js +++ b/src/internal/animations.js @@ -28,7 +28,7 @@ export function animate(node, from, fn, params) { if (css) { if (delay) node.style.cssText = cssText; - name = create_rule({ a: 0, b: 1, delta: 1, duration }, easing, css); + name = create_rule({ a: 0, b: 1, d: 1, duration }, easing, css); node.style.animation = (node.style.animation || '') .split(', ') diff --git a/src/internal/style_manager.js b/src/internal/style_manager.js index 6af5c091ed..e4b15ad8d5 100644 --- a/src/internal/style_manager.js +++ b/src/internal/style_manager.js @@ -13,12 +13,12 @@ function hash(str) { return hash >>> 0; } -export function create_rule({ a, b, delta, duration }, ease, fn) { +export function create_rule({ a, b, d, duration }, ease, fn) { const step = 16.666 / duration; let keyframes = '{\n'; for (let p = 0; p <= 1; p += step) { - const t = a + delta * ease(p); + const t = a + d * ease(p); keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`; }