mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
fix(animation): set property defaults to avoid inconsistencies (#19321)
* set defaults to avoid inconsistencies * update test
This commit is contained in:
@ -292,7 +292,7 @@ export const createAnimation = () => {
|
||||
if (_fill !== undefined) { return _fill; }
|
||||
if (parentAnimation) { return parentAnimation.getFill(); }
|
||||
|
||||
return undefined;
|
||||
return 'both';
|
||||
};
|
||||
|
||||
/**
|
||||
@ -303,7 +303,7 @@ export const createAnimation = () => {
|
||||
if (_direction !== undefined) { return _direction; }
|
||||
if (parentAnimation) { return parentAnimation.getDirection(); }
|
||||
|
||||
return undefined;
|
||||
return 'normal';
|
||||
|
||||
};
|
||||
|
||||
@ -315,7 +315,7 @@ export const createAnimation = () => {
|
||||
if (_easing !== undefined) { return _easing; }
|
||||
if (parentAnimation) { return parentAnimation.getEasing(); }
|
||||
|
||||
return undefined;
|
||||
return 'linear';
|
||||
};
|
||||
|
||||
/**
|
||||
@ -327,7 +327,7 @@ export const createAnimation = () => {
|
||||
if (_duration !== undefined) { return _duration; }
|
||||
if (parentAnimation) { return parentAnimation.getDuration(); }
|
||||
|
||||
return undefined;
|
||||
return 0;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -337,7 +337,7 @@ export const createAnimation = () => {
|
||||
if (_iterations !== undefined) { return _iterations; }
|
||||
if (parentAnimation) { return parentAnimation.getIterations(); }
|
||||
|
||||
return undefined;
|
||||
return 1;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -348,7 +348,7 @@ export const createAnimation = () => {
|
||||
if (_delay !== undefined) { return _delay; }
|
||||
if (parentAnimation) { return parentAnimation.getDelay(); }
|
||||
|
||||
return undefined;
|
||||
return 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user