1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Answers
    1
    Vote Rating
    0
    AntaresDaha is on a distinguished road

      0  

    Default Answered: List in scrollable View - double scrolling issue

    Answered: List in scrollable View - double scrolling issue


    Hi,
    basically i got a list as a childitem in a scrollable panel/container.
    Both scroll vertically, which means when i scroll up/down outside of the list the view itself scrolls just fine.
    Now the problem is, if i scroll "inside" the list it still also scrolls my view up and down, which is absolutely irritating.
    To get a better idea of my view I attached a screenshot:
    ListInScrollableView.PNG
    Can you guys give me any hint how to tackle that problem?
    I simply want to only scroll the list (but not the view) when scrolling inside the list component and when I scroll outside the list component the view itself should get scrolled,
    any help is appreciated,
    regards Antares

  2. Thanks to your suggestion i was able to come around with a solution.
    Although I did search for something like a "scroller" of my list I wasn't able to find one initially, but
    there actually is a scroller object, controlling the list's (+ one for the view's) scrolling, which you can get via mylist.getScrollable().getScroller() - notice getScrollable does not simply return a boolean a suggested by the documentation but a "complex" view/object containing a scroller.

    The solution I came up with was basically like Stx.Greg suggested, enabling/disabling the parents scrolling behavious in the sublist's evemt handlers for srollstart and scrollend:

    Code:
                dispatcherview:{
                    initialize: function(){
                        this.getDispatcherStaffList().getScrollable().getScroller().on('scrollend', function() {
                            Ext.getCmp('dispatcherview').getScrollable().getScroller().setDisabled(false);
                        });
                        this.getDispatcherStaffList().getScrollable().getScroller().on('scrollstart', function() {
                            Ext.getCmp('dispatcherview').getScrollable().getScroller().setDisabled(true);
                        });
                        this.getDispatchervDevelopertasksList().getScrollable().getScroller().on('scrollend', function() {
                            Ext.getCmp('dispatcherview').getScrollable().getScroller().setDisabled(false);
                        });
                        this.getDispatchervDevelopertasksList().getScrollable().getScroller().on('scrollstart', function() {
                            Ext.getCmp('dispatcherview').getScrollable().getScroller().setDisabled(true);
                        });
                    }
                },
    Thank you very much, regards

  3. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    22
    Vote Rating
    4
    Stx.Greg is on a distinguished road

      1  

    Default


    If you add an event handler on 'scrollstart' and 'scrollend' on the list's scroller, you can disable the parent container's scroller on scrollstart and then enable it again on scrollend.

  4. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Answers
    1
    Vote Rating
    0
    AntaresDaha is on a distinguished road

      0  

    Default solved.

    solved.


    Thanks to your suggestion i was able to come around with a solution.
    Although I did search for something like a "scroller" of my list I wasn't able to find one initially, but
    there actually is a scroller object, controlling the list's (+ one for the view's) scrolling, which you can get via mylist.getScrollable().getScroller() - notice getScrollable does not simply return a boolean a suggested by the documentation but a "complex" view/object containing a scroller.

    The solution I came up with was basically like Stx.Greg suggested, enabling/disabling the parents scrolling behavious in the sublist's evemt handlers for srollstart and scrollend:

    Code:
                dispatcherview:{
                    initialize: function(){
                        this.getDispatcherStaffList().getScrollable().getScroller().on('scrollend', function() {
                            Ext.getCmp('dispatcherview').getScrollable().getScroller().setDisabled(false);
                        });
                        this.getDispatcherStaffList().getScrollable().getScroller().on('scrollstart', function() {
                            Ext.getCmp('dispatcherview').getScrollable().getScroller().setDisabled(true);
                        });
                        this.getDispatchervDevelopertasksList().getScrollable().getScroller().on('scrollend', function() {
                            Ext.getCmp('dispatcherview').getScrollable().getScroller().setDisabled(false);
                        });
                        this.getDispatchervDevelopertasksList().getScrollable().getScroller().on('scrollstart', function() {
                            Ext.getCmp('dispatcherview').getScrollable().getScroller().setDisabled(true);
                        });
                    }
                },
    Thank you very much, regards

  5. #4
    Sencha User
    Join Date
    Sep 2011
    Location
    San Mateo, CA, USA
    Posts
    8
    Vote Rating
    0
    jkobilka is on a distinguished road

      0  

    Default


    You already found a solution that works for you, but I just wanted to mention (for anyone else who's having issues as well) that for me, setting the list to be scrollable only horizontally seems to have the same effect:

    Code:
    config: {
        ...
        scrollable: {    
            direction: 'horizontal',
            directionLock: true
        }
        ...
    }
    I should also note that in ST 2.0.1, the "scrollable: false" config setting was sufficient to get my child list to not double-scroll, but in 2.1 it appears to ignore that directive and scroll anyway unless I set the scroller as above.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi