[jira] [Commented] (WEEX-439) List inside slider may display incorrectly
[ https://issues.apache.org/jira/browse/WEEX-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16504151#comment-16504151 ] ASF GitHub Bot commented on WEEX-439: - GitHub user wqyfavor opened a pull request: https://github.com/apache/incubator-weex/pull/1245 [WEEX-439][iOS] Fix bug that list inside slider may display incorrectly. First of all, thank you for your contribution! Please makes sure that these checkboxes are checked before submitting your PR, thank you! CheckList: **if** *isBugFix* **:** * [ ] Make sure that you add at least one unit test for the bug which you had fixed. **elif** *isNewFeature* **:** * [ ] Update API docs for the component. * [ ] Update/Add demo to demonstrate new feature. * [ ] Update test scripts for the feature. * [ ] Add unit tests for the feature. You can merge this pull request into a Git repository by running: $ git pull https://github.com/wqyfavor/incubator-weex fix-sync Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/1245.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 #1245 commit aa3ce8c1bf21fd6c51e0cf64e1885894a9be53fb Author: 神漠 Date: 2018-06-07T02:10:01Z [WEEX-439][iOS] Fix bug that list inside slider may display incorrectly. > List inside slider may display incorrectly > -- > > Key: WEEX-439 > URL: https://issues.apache.org/jira/browse/WEEX-439 > Project: Weex > Issue Type: Bug > Components: iOS >Affects Versions: 0.17 > Environment: iOS >Reporter: Wang Qianyuan >Assignee: xingZhang >Priority: Major > Attachments: IMG_0141.PNG > > > {code:java} > class="wxslider" > infinite="false" > v-if="!isWeb" > :style="{ height: contentHeight}" > :index = "pageIndex" > scroll-direction="horizontal"> > > > 下拉刷新中 > > v-for="(item, itemIndex) in pageItem" > :key="itemIndex"> > :data="item.data" > :data-spm ="tabItems[listIndex].spmc" > :spmd="listIndex +'-'+ itemIndex" > v-on:loadCellData="loadCellData" > :tabIndex ="listIndex" > :showTipsView="showTipsView" > :tabData ="tabItems" > :index ="itemIndex"> > > > > > {code} > Mutliple lists inside a slider. On iOS there is chance that the frame of the > first list is incorrect. It looks like the width is screen width divided by > N, which N is count of lists. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WEEX-439) List inside slider may display incorrectly
[ https://issues.apache.org/jira/browse/WEEX-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16504154#comment-16504154 ] ASF GitHub Bot commented on WEEX-439: - Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/1245 Messages :book: has no jsfm file changed. :book: jsfm test finished. Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS > List inside slider may display incorrectly > -- > > Key: WEEX-439 > URL: https://issues.apache.org/jira/browse/WEEX-439 > Project: Weex > Issue Type: Bug > Components: iOS >Affects Versions: 0.17 > Environment: iOS >Reporter: Wang Qianyuan >Assignee: xingZhang >Priority: Major > Attachments: IMG_0141.PNG > > > {code:java} > class="wxslider" > infinite="false" > v-if="!isWeb" > :style="{ height: contentHeight}" > :index = "pageIndex" > scroll-direction="horizontal"> > > > 下拉刷新中 > > v-for="(item, itemIndex) in pageItem" > :key="itemIndex"> > :data="item.data" > :data-spm ="tabItems[listIndex].spmc" > :spmd="listIndex +'-'+ itemIndex" > v-on:loadCellData="loadCellData" > :tabIndex ="listIndex" > :showTipsView="showTipsView" > :tabData ="tabItems" > :index ="itemIndex"> > > > > > {code} > Mutliple lists inside a slider. On iOS there is chance that the frame of the > first list is incorrect. It looks like the width is screen width divided by > N, which N is count of lists. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WEEX-439) List inside slider may display incorrectly
[ https://issues.apache.org/jira/browse/WEEX-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16696420#comment-16696420 ] ASF GitHub Bot commented on WEEX-439: - wqyfavor closed pull request #1245: [WEEX-439][iOS] Fix bug that list inside slider may display incorrectly. URL: https://github.com/apache/incubator-weex/pull/1245 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/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm index ecca959107..1e4be38240 100644 --- a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm +++ b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm @@ -138,6 +138,16 @@ - (void)_frameDidCalculated:(BOOL)isChanged __weak typeof(self) weakSelf = self; [self.weexInstance.componentManager _addUITask:^{ __strong typeof(weakSelf) strongSelf = weakSelf; + +if (strongSelf == nil) { +return; +} + +// Check again incase that this property is set to NO in another UI task. +if (![strongSelf isViewFrameSyncWithCalculated]) { +return; +} + if (strongSelf->_transform && !CATransform3DEqualToTransform(strongSelf.layer.transform, CATransform3DIdentity)) { // From the UIView's frame documentation: // https://developer.apple.com/reference/uikit/uiview#//apple_ref/occ/instp/UIView/frame 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: us...@infra.apache.org > List inside slider may display incorrectly > -- > > Key: WEEX-439 > URL: https://issues.apache.org/jira/browse/WEEX-439 > Project: Weex > Issue Type: Bug > Components: iOS >Affects Versions: 0.17 > Environment: iOS >Reporter: Wang Qianyuan >Assignee: acton393 >Priority: Major > Attachments: IMG_0141.PNG > > > {code:java} > class="wxslider" > infinite="false" > v-if="!isWeb" > :style="{ height: contentHeight}" > :index = "pageIndex" > scroll-direction="horizontal"> > > > 下拉刷新中 > > v-for="(item, itemIndex) in pageItem" > :key="itemIndex"> > :data="item.data" > :data-spm ="tabItems[listIndex].spmc" > :spmd="listIndex +'-'+ itemIndex" > v-on:loadCellData="loadCellData" > :tabIndex ="listIndex" > :showTipsView="showTipsView" > :tabData ="tabItems" > :index ="itemIndex"> > > > > > {code} > Mutliple lists inside a slider. On iOS there is chance that the frame of the > first list is incorrect. It looks like the width is screen width divided by > N, which N is count of lists. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)