You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by JiaHongXu <gi...@git.apache.org> on 2017/07/10 09:53:05 UTC

[GitHub] incubator-weex pull request #501: [iOS] WXCycleSliderComponent initial index

GitHub user JiaHongXu opened a pull request:

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

    [iOS] WXCycleSliderComponent initial index

    bug fix: initial index of WXCycleSliderComponent may be incorrect if
    inserting subviews after layoutDidFinish (occurs when creating
    time-consuming subview/components)

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

    $ git pull https://github.com/JiaHongXu/incubator-weex 0.15-dev

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

    https://github.com/apache/incubator-weex/pull/501.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 #501
    
----
commit 3d7a90049195b1ad906163767647089665ecd33e
Author: 徐嘉宏 <ji...@alibaba-inc.com>
Date:   2017-07-10T08:40:25Z

    [iOS] WXCycleSliderComponent initial index
    
    bug fix: initial index of WXCycleSliderComponent may be incorrect if
    inserting subviews after layoutDidFinish (occurs when creating
    time-consuming subview/components)

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #501: [iOS] fix WXCycleSliderComponent initial i...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex issue #501: [iOS] WXCycleSliderComponent initial index

Posted by weex-bot <gi...@git.apache.org>.
Github user weex-bot commented on the issue:

    https://github.com/apache/incubator-weex/pull/501
  
    
    <!--
      1 failure:  This PR modify SD...
      2 warning:  No Changelog chan..., This PR should up...
      
      
    -->
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Fails</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:no_entry_sign:</td>
          <td>This PR modify SDK code. Please add/modify corresponding testcases. If it is ok, please comment about it. Or put '@notdanger' in you commit message.</td>
        </tr>
      </tbody>
    </table>
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Warnings</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:warning:</td>
          <td>No Changelog changes!</td>
        </tr>
      
    <tr>
          <td>:warning:</td>
          <td>This PR should update related documents as well. </td>
        </tr>
      </tbody>
    </table>
    
    
    
    <p align="right">
      Generated by :no_entry_sign: <a href="http://github.com/danger/danger-js/">dangerJS</a>
    </p>



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #501: [iOS] fix WXCycleSliderComponent initial i...

Posted by kfeagle <gi...@git.apache.org>.
Github user kfeagle commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/501#discussion_r126387701
  
    --- Diff: ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m ---
    @@ -460,6 +460,12 @@ - (void)insertSubview:(WXComponent *)subcomponent atIndex:(NSInteger)index
                     }
                 }
                 [recycleSliderView insertItemView:view atIndex:index - offset];
    +            
    +            // check if should apply current contentOffset
    +            // in case inserting subviews after layoutDidFinish
    +            if (index-offset == _index) {
    --- End diff --
    
    _index > 0 is it 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---