From 79cc6815d3240db305995ceaa4db8837002e84a1 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Wed, 2 Jan 2019 20:15:46 -0500 Subject: [PATCH] oops. fixes #1946 --- src/internal/animations.js | 2 +- src/internal/style_manager.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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`; }