Skip to content

Commit

Permalink
* [android] Parent's "append=tree" will prevent child's transform sty…
Browse files Browse the repository at this point in the history
…le, this commit fix it by add the whole dom tree to animation set instead of the root dom.
  • Loading branch information
YorkShen committed Dec 8, 2016
1 parent 460c2c7 commit 626915b
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ public String toString() {
return "createBody";
}
});
animations.add(new Pair<String, Map<String, Object>>(domObject.getRef(),domObject.getStyles()));
addAnimationForDomTree(domObject);
mDirty = true;

if (instance != null) {
Expand Down Expand Up @@ -690,7 +690,7 @@ public String toString() {
return "AddDom";
}
});
animations.add(new Pair<String, Map<String, Object>>(domObject.getRef(),domObject.getStyles()));
addAnimationForDomTree(domObject);
mDirty = true;

if (instance != null) {
Expand Down Expand Up @@ -1219,6 +1219,13 @@ public String toString() {
}
}

private void addAnimationForDomTree(WXDomObject domObject){
animations.add(new Pair<String, Map<String, Object>>(domObject.getRef(),domObject.getStyles()));
for(int i=0;i<domObject.childCount();i++){
addAnimationForDomTree(domObject.getChild(i));
}
}

private WXAnimationBean createAnimationBean(String ref, String animation){
try {
WXAnimationBean animationBean =
Expand Down

0 comments on commit 626915b

Please sign in to comment.