fix(animation): add property conversions for CSS Animations (#20252)

fixes #20251
This commit is contained in:
Liam DeBeasi
2020-01-21 12:28:41 -05:00
committed by GitHub
parent 34bfc62820
commit 32a7401576
6 changed files with 40 additions and 19 deletions

View File

@ -494,9 +494,10 @@ export const createAnimation = (animationId?: string): Animation => {
const initializeCSSAnimation = (toggleAnimationName = true) => {
cleanUpStyleSheets();
const processedKeyframes = processKeyframes(_keyframes);
elements.forEach(element => {
if (_keyframes.length > 0) {
const keyframeRules = generateKeyframeRules(_keyframes);
if (processedKeyframes.length > 0) {
const keyframeRules = generateKeyframeRules(processedKeyframes);
keyframeName = (animationId !== undefined) ? animationId : generateKeyframeName(keyframeRules);
const stylesheet = createKeyframeStylesheet(keyframeName, keyframeRules, element);
stylesheets.push(stylesheet);
@ -526,10 +527,8 @@ export const createAnimation = (animationId?: string): Animation => {
};
const initializeWebAnimation = () => {
const processedKeyframes = processKeyframes(_keyframes);
elements.forEach(element => {
const animation = element.animate(processedKeyframes, {
const animation = element.animate(_keyframes, {
id,
delay: getDelay(),
duration: getDuration(),