You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by mo...@apache.org on 2019/04/01 02:45:06 UTC
[incubator-weex] branch master updated: [iOS] Add "isDragging"
property to scroll event of a list component.
This is an automated email from the ASF dual-hosted git repository.
moshen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new bb1a2ec [iOS] Add "isDragging" property to scroll event of a list component.
new 5754949 Merge pull request #2258 from sunshl/feature_isdragging
bb1a2ec is described below
commit bb1a2ec97ae4f8f393819c3586cc5b364dee0a7d
Author: huanglei.hl <hu...@alibaba-inc.com>
AuthorDate: Thu Mar 28 16:38:25 2019 +0800
[iOS] Add "isDragging" property to scroll event of a list component.
* feature: Add "isDragging" property to scroll event of a list component.
* doc pr: apache/incubator-weex-site#361
---
ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm
index 98f061b..c0406eb 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm
@@ -718,12 +718,13 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
@"height":@(scrollView.contentSize.height / scaleFactor)};
NSDictionary *contentOffsetData = @{@"x":@(-scrollView.contentOffset.x / scaleFactor),
@"y":@(-scrollView.contentOffset.y / scaleFactor)};
+ NSDictionary *params = @{@"contentSize":contentSizeData, @"contentOffset":contentOffsetData, @"isDragging":@(scrollView.isDragging)};
if (_scrollStartEvent) {
- [self fireEvent:@"scrollstart" params:@{@"contentSize":contentSizeData, @"contentOffset":contentOffsetData} domChanges:nil];
+ [self fireEvent:@"scrollstart" params:params domChanges:nil];
}
if (_scrollEventListener) {
- _scrollEventListener(self, @"scrollstart", @{@"contentSize":contentSizeData, @"contentOffset":contentOffsetData});
+ _scrollEventListener(self, @"scrollstart", params);
}
}