[ 
https://issues.apache.org/jira/browse/WEEX-644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16649986#comment-16649986
 ] 

ASF GitHub Bot commented on WEEX-644:
-------------------------------------

YorkShen closed pull request #1634: [WEEX-644][Android] fix transform origin 
not right when animating with Animatio…
URL: https://github.com/apache/incubator-weex/pull/1634
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/action/GraphicActionAnimation.java
 
b/android/sdk/src/main/java/com/taobao/weex/ui/action/GraphicActionAnimation.java
index 6df77b2448..4023b0c232 100644
--- 
a/android/sdk/src/main/java/com/taobao/weex/ui/action/GraphicActionAnimation.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/action/GraphicActionAnimation.java
@@ -41,6 +41,7 @@
 import com.alibaba.fastjson.JSONObject;
 import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.WXSDKManager;
+import com.taobao.weex.common.Constants;
 import com.taobao.weex.ui.animation.BackgroundColorProperty;
 import com.taobao.weex.ui.animation.HeightProperty;
 import com.taobao.weex.ui.animation.WXAnimationBean;
@@ -120,6 +121,12 @@ public void executeAction() {
 
     if (null != mAnimationBean.styles) {
       if(styleNeedInit) {
+        // Synchronize transformOrigin between component styles and animation 
style before
+        // animation start.
+        String transformOrigin = (String) 
component.getStyles().get(Constants.Name.TRANSFORM_ORIGIN);
+        if (TextUtils.isEmpty(mAnimationBean.styles.transformOrigin)) {
+          mAnimationBean.styles.transformOrigin = transformOrigin;
+        }
         mAnimationBean.styles.init(mAnimationBean.styles.transformOrigin,
             mAnimationBean.styles.transform, (int) component.getLayoutWidth(),
             (int) component.getLayoutHeight(),


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [Android] fix transform origin not right when animating with AnimationModule
> ----------------------------------------------------------------------------
>
>                 Key: WEEX-644
>                 URL: https://issues.apache.org/jira/browse/WEEX-644
>             Project: Weex
>          Issue Type: Bug
>            Reporter: yxp
>            Assignee: Adam Feng
>            Priority: Major
>
> By setting transform-origin on css styles, transform origin is not as 
> expected when animating the view with AnimationModule.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to