1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    0
    revilo78 is on a distinguished road

      0  

    Default Unanswered: Carousel scrolling horizontal with lists scolling vertical Issue

    Unanswered: Carousel scrolling horizontal with lists scolling vertical Issue


    I have a carousel that moves horizontally with a few cards. The cards are made of lists which move vertically. The problem I'm having is that when I move horizontally from one card to another, I can still move the list vertically that I was previously on. Is there a way to lock the list from moving vertically once I start moving horizontally on the carousel?

    I was able to lock the list from moving horizontally with the direction: 'vertical', directionLock: true, setting in each list. However, I haven't been able to figure how to lock the list in place once I move through the carousel horizontally. I tried putting the following scrollable code in the carousel, but it strangely prevented me from moving horizontally even though I put horizontal as the direction.

    scrollable: {
    direction: 'horizontal',
    directionLock: true
    }

    Any help will be greatly appreciated. Thanks.

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    Do not set carousel's scrollable config.
    Just set directionLock:true as config.
    Code:
    {
        //other carousel config here
        directionLock:true
    }
    I write English by translator.

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    0
    revilo78 is on a distinguished road

      0  

    Default


    Thanks Haduki, but it don't work. If you look on Sencha docs, directionLock is not available for the carousel component.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,220
    Answers
    3522
    Vote Rating
    859
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Did you put this on the list?

    Code:
    scrollable: {
        direction: 'vertical', 
        directionLock: true
    }
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    0
    revilo78 is on a distinguished road

      0  

    Default


    Yes, each list has scrollable with direction and directionLock attributes.

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Location
    Delhi, India
    Posts
    94
    Answers
    2
    Vote Rating
    0
    Abhishek Srivastava is on a distinguished road

      0  

    Default


    I think directionLock set to true on list will prevent horizontal scroll in list when scrolling it vertical but wont prevent the drag of carousel

  7. #7
    Sencha User
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    0
    revilo78 is on a distinguished road

      0  

    Default


    So is there a way to prevent the drag on carousel?