fix(animations): ensure parent animations are triggered before children (#11201)

This commit is contained in:
Matias Niemelä
2016-09-01 23:24:26 +03:00
committed by Martin Probst
parent e42a057048
commit c9e5b599e4
7 changed files with 135 additions and 21 deletions

View File

@ -574,12 +574,14 @@ function generateCreateMethod(view: CompileView): o.Statement[] {
function generateDetectChangesMethod(view: CompileView): o.Statement[] {
var stmts: any[] = [];
if (view.detectChangesInInputsMethod.isEmpty() && view.updateContentQueriesMethod.isEmpty() &&
if (view.animationBindingsMethod.isEmpty() && view.detectChangesInInputsMethod.isEmpty() &&
view.updateContentQueriesMethod.isEmpty() &&
view.afterContentLifecycleCallbacksMethod.isEmpty() &&
view.detectChangesRenderPropertiesMethod.isEmpty() &&
view.updateViewQueriesMethod.isEmpty() && view.afterViewLifecycleCallbacksMethod.isEmpty()) {
return stmts;
}
ListWrapper.addAll(stmts, view.animationBindingsMethod.finish());
ListWrapper.addAll(stmts, view.detectChangesInInputsMethod.finish());
stmts.push(
o.THIS_EXPR.callMethod('detectContentChildrenChanges', [DetectChangesVars.throwOnChange])