fix(renderer): remove unecessary setElementStyles method
There is no need to expose this additional method inside of the Renderer API. The functionality can be restored by looping and calling `setElementStyle` instead. Note that this change is changing code that was was introduced after the last release therefore this fix is not a breaking change. Closes #9000 Closes #9009
This commit is contained in:
@ -243,12 +243,16 @@ class _AnimationBuilder implements AnimationAstVisitor {
|
||||
_ANIMATION_END_STATE_STYLES_VAR.set(EMPTY_MAP).toStmt()
|
||||
]));
|
||||
|
||||
|
||||
var RENDER_STYLES_FN = o.importExpr(Identifiers.renderStyles);
|
||||
|
||||
// before we start any animation we want to clear out the starting
|
||||
// styles from the element's style property (since they were placed
|
||||
// there at the end of the last animation
|
||||
statements.push(
|
||||
_ANIMATION_FACTORY_RENDERER_VAR.callMethod('setElementStyles', [
|
||||
RENDER_STYLES_FN.callFn([
|
||||
_ANIMATION_FACTORY_ELEMENT_VAR,
|
||||
_ANIMATION_FACTORY_RENDERER_VAR,
|
||||
o.importExpr(Identifiers.clearStyles).callFn([_ANIMATION_START_STATE_STYLES_VAR])
|
||||
]).toStmt());
|
||||
|
||||
@ -269,8 +273,9 @@ class _AnimationBuilder implements AnimationAstVisitor {
|
||||
statements.push(
|
||||
_ANIMATION_PLAYER_VAR.callMethod('onDone', [
|
||||
o.fn([], [
|
||||
_ANIMATION_FACTORY_RENDERER_VAR.callMethod('setElementStyles', [
|
||||
RENDER_STYLES_FN.callFn([
|
||||
_ANIMATION_FACTORY_ELEMENT_VAR,
|
||||
_ANIMATION_FACTORY_RENDERER_VAR,
|
||||
o.importExpr(Identifiers.balanceAnimationStyles).callFn([
|
||||
_ANIMATION_START_STATE_STYLES_VAR,
|
||||
_ANIMATION_END_STATE_STYLES_VAR
|
||||
|
Reference in New Issue
Block a user