Results 1 to 5 of 5

Thread: Can be list cycled?

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    61
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: Can be list cycled?

    I want cycled behaviour: when the list is over, it should start from the beginning. Is it possible?

  2. You can listen to the scrollend event on the Scroller and then scroll to the top...

    Code:
    var scroller = list.getScrollable().getScroller();
    
    function onScrollEnd() {
        this.scrollToTop(true); //true for anim, false for no anim
    }
    
    scroller.on('scrollend', onScrollEnd, scroller);

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,026
    Answers
    3976
    Vote Rating
    1367
      0  

    Default

    You can listen to the scrollend event on the Scroller and then scroll to the top...

    Code:
    var scroller = list.getScrollable().getScroller();
    
    function onScrollEnd() {
        this.scrollToTop(true); //true for anim, false for no anim
    }
    
    scroller.on('scrollend', onScrollEnd, scroller);
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    61
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Can you give this example for
    Code:
    xtype: 'list'
    , please?

  5. #4
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,026
    Answers
    3976
    Vote Rating
    1367
      0  

    Default

    The code I gave will work for a list hence it using the list variable that you have to come up with (resolve)
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  6. #5
    Sencha User
    Join Date
    Jul 2012
    Posts
    61
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Thanks for advice, but scrollend fire when scroll ended, but not list

    So i added condition like:
    Code:
    if (y >= scroller.maxPosition.y)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •