mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(animations): update wapi polyfill
Do not clear out all inline styles after the web animation api polypfill has finished.
This commit is contained in:
@@ -457,7 +457,7 @@ class Animate {
|
||||
return inlineStyle(ele, this.toEffect);
|
||||
}
|
||||
|
||||
this.fill = fill || 'both';
|
||||
this.fill = fill;
|
||||
|
||||
this.ele = ele;
|
||||
this.promise = new Promise(res => { this.resolve = res; });
|
||||
@@ -494,7 +494,7 @@ class Animate {
|
||||
duration: self.duration || 0,
|
||||
easing: self.easing,
|
||||
playbackRate: self.rate || 1,
|
||||
//fill: this.fill
|
||||
fill: self.fill
|
||||
});
|
||||
|
||||
self.player.onfinish = () => {
|
||||
@@ -503,6 +503,8 @@ class Animate {
|
||||
// to its "from" effects
|
||||
inlineStyle(self.ele, self.rate < 0 ? self.fromEffect : self.toEffect);
|
||||
|
||||
self.player = null;
|
||||
|
||||
self.resolve();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,9 +31,16 @@
|
||||
scope.apply(target, interpolation.property, interpolation.interpolation(scaledLocalTime));
|
||||
});
|
||||
} else {
|
||||
for (var property in propertySpecificKeyframeGroups)
|
||||
if (property != 'offset' && property != 'easing' && property != 'composite')
|
||||
scope.clear(target, property);
|
||||
|
||||
// IONIC HACK!
|
||||
// DO NOT CLEAR OUT THE INLINE STYLE HERE
|
||||
// IONIC ANIMATE SETS INLINE STYLES ITSELF AND THE WEB ANIMATIONS API WILL
|
||||
// OVERWRITE IONIC DUE TO THE ASYNC PROMISES THAT FIRE OFF AFTER ONFINISH
|
||||
|
||||
// for (var property in propertySpecificKeyframeGroups)
|
||||
// if (property != 'offset' && property != 'easing' && property != 'composite')
|
||||
// scope.clear(target, property);
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user