mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
fix(animation): add property conversions for CSS Animations (#20252)
fixes #20251
This commit is contained in:
@ -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(),
|
||||
|
Reference in New Issue
Block a user