[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-weex/pull/581


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-09 Thread cxfeng1
Github user cxfeng1 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r132130861
  
--- Diff: ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m ---
@@ -112,6 +115,211 @@ - (NSUInteger)_childrenCountForLayout
 return (int)(count);
 }
 
+
+#pragma mark LayoutAnimationDisplayLink
+- (void)_startLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (!_layoutAnimationDisplayLink) {
+_layoutAnimationDisplayLink = [CADisplayLink 
displayLinkWithTarget:self 
selector:@selector(_handleLayoutAnimationDisplayLink)];
+[_layoutAnimationDisplayLink addToRunLoop:[NSRunLoop 
currentRunLoop] forMode:NSDefaultRunLoopMode];
+}
+else{
+[self _awakeLayoutAnimationDisplayLink];
+}
+
+}
+
+- (void)_stopLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (_layoutAnimationDisplayLink) {
+[_layoutAnimationDisplayLink invalidate];
+_layoutAnimationDisplayLink = nil;
+}
+}
+
+- (void)_suspendLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if(_layoutAnimationDisplayLink && !_layoutAnimationDisplayLink.paused)
+{
+_layoutAnimationDisplayLink.paused = YES;
+}
+}
+
+
+- (void)_awakeLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (_layoutAnimationDisplayLink && _layoutAnimationDisplayLink.paused) 
{
+_layoutAnimationDisplayLink.paused = NO;
+}
+}
+
+- (void)_handleLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+int count = _layoutAnimationDuration * 60 / 1000;
+if (_layoutAnimationCount >= count) {
+[self _suspendLayoutAnimationDisplayLink];
+[self _resetProcessAnimationParameter];
+return;
+}
+else
+{
+[self _calculateLayoutAnimationProcessingStyle];
+}
+_layoutAnimationCount ++;
+}
+
+
+- (void)_resetProcessAnimationParameter
+{
+
+_layoutAnimationCount = 0;
+_layoutAnimationDuration = 0;
+_widthInfo = nil;
+_heightInfo = nil;
+_leftInfo = nil;
+_rightInfo = nil;
+_topInfo = nil;
+_bottomInfo = nil;
+}
+
+- (void)_handleLayoutAnimationWithStyles:(NSDictionary *)styles
+{
+[self _suspendLayoutAnimationDisplayLink];
+
+if (!_addStyles) {
+_fromStyles = [NSMutableDictionary 
dictionaryWithDictionary:self.styles];
+_addStyles = [NSMutableDictionary dictionaryWithDictionary:styles];
+}
+else
+{
+[_addStyles addEntriesFromDictionary:styles];
+}//保证_addStyles是唯一的
+
+_toStyles = [NSMutableDictionary dictionaryWithDictionary:_fromStyles];
+[_toStyles addEntriesFromDictionary:_addStyles];
+
+_layoutAnimationDuration = _fromStyles[@"transitionDuration"] ? 
[WXConvert CGFloat:_fromStyles[@"transitionDuration"]] : 0;
+_layoutAnimationDelay = _fromStyles[@"transitionDelay"] ? [WXConvert 
CGFloat:_fromStyles[@"transitionDelay"]] : 0;
+_layoutAnimationTimingFunction = [WXConvert 
CAMediaTimingFunction:_fromStyles[@"transitionTimingFunction"]];
+
+
+if (_layoutAnimationDuration == 0) {
+[self _fillCSSNode:styles];
+return;//如果duration为零直接关闭动画效果
--- End diff --

Use English Comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-09 Thread cxfeng1
Github user cxfeng1 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r132132975
  
--- Diff: ios/sdk/WeexSDK/Sources/Module/WXAnimationLayout.h ---
@@ -1,49 +1,49 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#import 
-
-#import "WXComponent.h"
-#import "WXComponent_internal.h"
-#import "NSTimer+Weex.h"
-
-@interface WXAnimationLayoutInfo : NSObject
-
-@property (nonatomic, strong) NSString *propertyName;
-@property (nonatomic, strong) id fromValue;
-@property (nonatomic, strong) id toValue;
-
-@end
-
-
-@interface WXAnimationLayout : NSObject
-
-@property (nonatomic,strong) NSTimer *updateStyleTimer;
-@property (nonatomic,strong) WXComponent *targetComponent;
-@property (nonatomic,strong) NSDate *animationStartDate;
-@property (nonatomic,strong) WXAnimationLayoutInfo *widthInfo;
-@property (nonatomic,strong) WXAnimationLayoutInfo *heightInfo;
-@property (nonatomic,assign) double animationDuration;
-@property (nonatomic,assign) double animationDelay;
-@property (nonatomic,strong) NSDictionary *needUpdateStyles;
-@property (nonatomic, weak) WXSDKInstance *weexInstance;
-
-- (void)layoutForAnimation;
-
-@end
+///*
--- End diff --

Just delete WXAnimationLayout.h/m


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-09 Thread cxfeng1
Github user cxfeng1 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r132131448
  
--- Diff: ios/sdk/WeexSDK/Sources/Model/WXComponent.m ---
@@ -436,16 +436,35 @@ - (void)_moveToSupercomponent:(WXComponent 
*)newSupercomponent atIndex:(NSUInteg
 
 - (void)_updateStylesOnComponentThread:(NSDictionary *)styles 
resetStyles:(NSMutableArray *)resetStyles isUpdateStyles:(BOOL)isUpdateStyles
 {
-if (isUpdateStyles) {
-pthread_mutex_lock(&_propertyMutex);
-[_styles addEntriesFromDictionary:styles];
-pthread_mutex_unlock(&_propertyMutex);
+
+//æ 
¹æ®å½“前的style是否含有transitionProperty属性来判断是否有Layout 
Animation
+if (_styles[@"transitionProperty"]) {
--- End diff --

Only transitionProperty?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-09 Thread cxfeng1
Github user cxfeng1 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r132132579
  
--- Diff: ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m ---
@@ -409,4 +617,77 @@ static css_dim_t cssNodeMeasure(void *context, float 
width, css_measure_mode_t w
 return (css_dim_t){resultSize.width, resultSize.height};
 }
 
+//贝塞尔曲线计算
--- End diff --

Use English comments


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-09 Thread cxfeng1
Github user cxfeng1 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r132130697
  
--- Diff: ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m ---
@@ -112,6 +115,211 @@ - (NSUInteger)_childrenCountForLayout
 return (int)(count);
 }
 
+
+#pragma mark LayoutAnimationDisplayLink
+- (void)_startLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (!_layoutAnimationDisplayLink) {
+_layoutAnimationDisplayLink = [CADisplayLink 
displayLinkWithTarget:self 
selector:@selector(_handleLayoutAnimationDisplayLink)];
+[_layoutAnimationDisplayLink addToRunLoop:[NSRunLoop 
currentRunLoop] forMode:NSDefaultRunLoopMode];
+}
+else{
+[self _awakeLayoutAnimationDisplayLink];
+}
+
+}
+
+- (void)_stopLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (_layoutAnimationDisplayLink) {
+[_layoutAnimationDisplayLink invalidate];
+_layoutAnimationDisplayLink = nil;
+}
+}
+
+- (void)_suspendLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if(_layoutAnimationDisplayLink && !_layoutAnimationDisplayLink.paused)
+{
+_layoutAnimationDisplayLink.paused = YES;
+}
+}
+
+
+- (void)_awakeLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (_layoutAnimationDisplayLink && _layoutAnimationDisplayLink.paused) 
{
+_layoutAnimationDisplayLink.paused = NO;
+}
+}
+
+- (void)_handleLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+int count = _layoutAnimationDuration * 60 / 1000;
+if (_layoutAnimationCount >= count) {
+[self _suspendLayoutAnimationDisplayLink];
+[self _resetProcessAnimationParameter];
+return;
+}
+else
+{
+[self _calculateLayoutAnimationProcessingStyle];
+}
+_layoutAnimationCount ++;
+}
+
+
+- (void)_resetProcessAnimationParameter
+{
+
+_layoutAnimationCount = 0;
+_layoutAnimationDuration = 0;
+_widthInfo = nil;
+_heightInfo = nil;
+_leftInfo = nil;
+_rightInfo = nil;
+_topInfo = nil;
+_bottomInfo = nil;
+}
+
+- (void)_handleLayoutAnimationWithStyles:(NSDictionary *)styles
+{
+[self _suspendLayoutAnimationDisplayLink];
+
+if (!_addStyles) {
+_fromStyles = [NSMutableDictionary 
dictionaryWithDictionary:self.styles];
+_addStyles = [NSMutableDictionary dictionaryWithDictionary:styles];
+}
+else
+{
+[_addStyles addEntriesFromDictionary:styles];
+}//保证_addStyles是唯一的
--- End diff --

Use English Comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-09 Thread cxfeng1
Github user cxfeng1 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r132131367
  
--- Diff: ios/sdk/WeexSDK/Sources/Model/WXComponent.m ---
@@ -436,16 +436,35 @@ - (void)_moveToSupercomponent:(WXComponent 
*)newSupercomponent atIndex:(NSUInteg
 
 - (void)_updateStylesOnComponentThread:(NSDictionary *)styles 
resetStyles:(NSMutableArray *)resetStyles isUpdateStyles:(BOOL)isUpdateStyles
 {
-if (isUpdateStyles) {
-pthread_mutex_lock(&_propertyMutex);
-[_styles addEntriesFromDictionary:styles];
-pthread_mutex_unlock(&_propertyMutex);
+
+//æ 
¹æ®å½“前的style是否含有transitionProperty属性来判断是否有Layout 
Animation
--- End diff --

Use English Comments


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-09 Thread cxfeng1
Github user cxfeng1 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r132132531
  
--- Diff: ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m ---
@@ -112,6 +115,211 @@ - (NSUInteger)_childrenCountForLayout
 return (int)(count);
 }
 
+
+#pragma mark LayoutAnimationDisplayLink
+- (void)_startLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (!_layoutAnimationDisplayLink) {
+_layoutAnimationDisplayLink = [CADisplayLink 
displayLinkWithTarget:self 
selector:@selector(_handleLayoutAnimationDisplayLink)];
+[_layoutAnimationDisplayLink addToRunLoop:[NSRunLoop 
currentRunLoop] forMode:NSDefaultRunLoopMode];
+}
+else{
+[self _awakeLayoutAnimationDisplayLink];
+}
+
+}
+
+- (void)_stopLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (_layoutAnimationDisplayLink) {
+[_layoutAnimationDisplayLink invalidate];
+_layoutAnimationDisplayLink = nil;
+}
+}
+
+- (void)_suspendLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if(_layoutAnimationDisplayLink && !_layoutAnimationDisplayLink.paused)
+{
+_layoutAnimationDisplayLink.paused = YES;
+}
+}
+
+
+- (void)_awakeLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (_layoutAnimationDisplayLink && _layoutAnimationDisplayLink.paused) 
{
+_layoutAnimationDisplayLink.paused = NO;
+}
+}
+
+- (void)_handleLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+int count = _layoutAnimationDuration * 60 / 1000;
+if (_layoutAnimationCount >= count) {
+[self _suspendLayoutAnimationDisplayLink];
+[self _resetProcessAnimationParameter];
+return;
+}
+else
+{
+[self _calculateLayoutAnimationProcessingStyle];
+}
+_layoutAnimationCount ++;
+}
+
+
+- (void)_resetProcessAnimationParameter
+{
+
+_layoutAnimationCount = 0;
+_layoutAnimationDuration = 0;
+_widthInfo = nil;
+_heightInfo = nil;
+_leftInfo = nil;
+_rightInfo = nil;
+_topInfo = nil;
+_bottomInfo = nil;
+}
+
+- (void)_handleLayoutAnimationWithStyles:(NSDictionary *)styles
+{
+[self _suspendLayoutAnimationDisplayLink];
+
+if (!_addStyles) {
+_fromStyles = [NSMutableDictionary 
dictionaryWithDictionary:self.styles];
+_addStyles = [NSMutableDictionary dictionaryWithDictionary:styles];
+}
+else
+{
+[_addStyles addEntriesFromDictionary:styles];
+}//保证_addStyles是唯一的
+
+_toStyles = [NSMutableDictionary dictionaryWithDictionary:_fromStyles];
+[_toStyles addEntriesFromDictionary:_addStyles];
+
+_layoutAnimationDuration = _fromStyles[@"transitionDuration"] ? 
[WXConvert CGFloat:_fromStyles[@"transitionDuration"]] : 0;
+_layoutAnimationDelay = _fromStyles[@"transitionDelay"] ? [WXConvert 
CGFloat:_fromStyles[@"transitionDelay"]] : 0;
+_layoutAnimationTimingFunction = [WXConvert 
CAMediaTimingFunction:_fromStyles[@"transitionTimingFunction"]];
+
+
+if (_layoutAnimationDuration == 0) {
+[self _fillCSSNode:styles];
+return;//如果duration为零直接关闭动画效果
+}
+
+if (![[NSString stringWithFormat:@"%@",_layoutAnimationTimingFunction] 
isEqualToString: kCAMediaTimingFunctionLinear]) {
+float vec[4] = {0.};
+[_layoutAnimationTimingFunction getControlPointAtIndex:1 
values:[0]];
+[_layoutAnimationTimingFunction getControlPointAtIndex:2 
values:[2]];
+[self unitBezierp1x:vec[0] p1y:vec[1] p2x:vec[2] p2y:vec[3]];
+}
+
+
+NSString *layoutAnimationProperty = _fromStyles[@"transitionProperty"];
+if ([layoutAnimationProperty containsString:@"width"]) {
+_widthInfo = [WXLayoutAnimationInfo new];
+_widthInfo.isAnimated = YES;
+_widthInfo.fromValue = @(_fromStyles[@"width"] ? [WXConvert 
CGFloat:_fromStyles[@"width" ]] : 0);
+_widthInfo.toValue = @(_toStyles[@"width"] ? [WXConvert 
CGFloat:_toStyles[@"width"]] : 0 );
+_widthInfo.perValue = @([_widthInfo.toValue doubleValue] - 
[_widthInfo.fromValue doubleValue]);
+
+}
+if ([layoutAnimationProperty containsString:@"height"])
+{
+_heightInfo = [WXLayoutAnimationInfo new];
+_heightInfo.isAnimated = YES;
+_heightInfo.fromValue = @(_fromStyles[@"height"] ? [WXConvert 
CGFloat:_fromStyles[@"height" ]] : 0);
+

[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-09 Thread cxfeng1
Github user cxfeng1 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r132132151
  
--- Diff: ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m ---
@@ -112,6 +115,211 @@ - (NSUInteger)_childrenCountForLayout
 return (int)(count);
 }
 
+
+#pragma mark LayoutAnimationDisplayLink
+- (void)_startLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (!_layoutAnimationDisplayLink) {
+_layoutAnimationDisplayLink = [CADisplayLink 
displayLinkWithTarget:self 
selector:@selector(_handleLayoutAnimationDisplayLink)];
+[_layoutAnimationDisplayLink addToRunLoop:[NSRunLoop 
currentRunLoop] forMode:NSDefaultRunLoopMode];
+}
+else{
+[self _awakeLayoutAnimationDisplayLink];
+}
+
+}
+
+- (void)_stopLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (_layoutAnimationDisplayLink) {
+[_layoutAnimationDisplayLink invalidate];
+_layoutAnimationDisplayLink = nil;
+}
+}
+
+- (void)_suspendLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if(_layoutAnimationDisplayLink && !_layoutAnimationDisplayLink.paused)
+{
+_layoutAnimationDisplayLink.paused = YES;
+}
+}
+
+
+- (void)_awakeLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+if (_layoutAnimationDisplayLink && _layoutAnimationDisplayLink.paused) 
{
+_layoutAnimationDisplayLink.paused = NO;
+}
+}
+
+- (void)_handleLayoutAnimationDisplayLink
+{
+WXAssertComponentThread();
+int count = _layoutAnimationDuration * 60 / 1000;
+if (_layoutAnimationCount >= count) {
+[self _suspendLayoutAnimationDisplayLink];
+[self _resetProcessAnimationParameter];
+return;
+}
+else
+{
+[self _calculateLayoutAnimationProcessingStyle];
+}
+_layoutAnimationCount ++;
+}
+
+
+- (void)_resetProcessAnimationParameter
+{
+
+_layoutAnimationCount = 0;
+_layoutAnimationDuration = 0;
+_widthInfo = nil;
+_heightInfo = nil;
+_leftInfo = nil;
+_rightInfo = nil;
+_topInfo = nil;
+_bottomInfo = nil;
+}
+
+- (void)_handleLayoutAnimationWithStyles:(NSDictionary *)styles
+{
+[self _suspendLayoutAnimationDisplayLink];
+
+if (!_addStyles) {
+_fromStyles = [NSMutableDictionary 
dictionaryWithDictionary:self.styles];
+_addStyles = [NSMutableDictionary dictionaryWithDictionary:styles];
+}
+else
+{
+[_addStyles addEntriesFromDictionary:styles];
+}//保证_addStyles是唯一的
+
+_toStyles = [NSMutableDictionary dictionaryWithDictionary:_fromStyles];
+[_toStyles addEntriesFromDictionary:_addStyles];
+
+_layoutAnimationDuration = _fromStyles[@"transitionDuration"] ? 
[WXConvert CGFloat:_fromStyles[@"transitionDuration"]] : 0;
+_layoutAnimationDelay = _fromStyles[@"transitionDelay"] ? [WXConvert 
CGFloat:_fromStyles[@"transitionDelay"]] : 0;
+_layoutAnimationTimingFunction = [WXConvert 
CAMediaTimingFunction:_fromStyles[@"transitionTimingFunction"]];
+
+
+if (_layoutAnimationDuration == 0) {
+[self _fillCSSNode:styles];
+return;//如果duration为零直接关闭动画效果
+}
+
+if (![[NSString stringWithFormat:@"%@",_layoutAnimationTimingFunction] 
isEqualToString: kCAMediaTimingFunctionLinear]) {
+float vec[4] = {0.};
+[_layoutAnimationTimingFunction getControlPointAtIndex:1 
values:[0]];
+[_layoutAnimationTimingFunction getControlPointAtIndex:2 
values:[2]];
+[self unitBezierp1x:vec[0] p1y:vec[1] p2x:vec[2] p2y:vec[3]];
+}
+
+
+NSString *layoutAnimationProperty = _fromStyles[@"transitionProperty"];
+if ([layoutAnimationProperty containsString:@"width"]) {
+_widthInfo = [WXLayoutAnimationInfo new];
+_widthInfo.isAnimated = YES;
+_widthInfo.fromValue = @(_fromStyles[@"width"] ? [WXConvert 
CGFloat:_fromStyles[@"width" ]] : 0);
+_widthInfo.toValue = @(_toStyles[@"width"] ? [WXConvert 
CGFloat:_toStyles[@"width"]] : 0 );
+_widthInfo.perValue = @([_widthInfo.toValue doubleValue] - 
[_widthInfo.fromValue doubleValue]);
+
+}
+if ([layoutAnimationProperty containsString:@"height"])
+{
+_heightInfo = [WXLayoutAnimationInfo new];
+_heightInfo.isAnimated = YES;
+_heightInfo.fromValue = @(_fromStyles[@"height"] ? [WXConvert 
CGFloat:_fromStyles[@"height" ]] : 0);
+

[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-08 Thread kfeagle
Github user kfeagle commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/581#discussion_r131900391
  
--- Diff: ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h ---
@@ -214,3 +251,11 @@
 - (void)setGradientLayer;
 
 @end
+
+@interface WXLayoutAnimationInfo : NSObject
+@property (nonatomic, strong) id fromValue;
--- End diff --

use for CGfloat, maybe assign is better?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation

2017-08-08 Thread doumafang
GitHub user doumafang opened a pull request:

https://github.com/apache/incubator-weex/pull/581

+ [ios] LayoutAnimation

Layout Animation Base on CADisplayLink,to create generated frame 
animation.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/doumafang/incubator-weex 
ios-feature-layoutanimation-0.16dev

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/581.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #581


commit 6bd86e5625bff1310a48244fd2c74db307b9314e
Author: doumafang 
Date:   2017-08-08T12:31:03Z

+ [ios] LayoutAnimation




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---