Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User Ethan Long's Avatar
    Join Date
    Feb 2012
    Posts
    70
    Answers
    2
    Vote Rating
    1
    Ethan Long is on a distinguished road

      0  

    Default Answered: How do I know whether a scroller need to scroll?

    Answered: How do I know whether a scroller need to scroll?


    I mean how do I know if a panel's size is big enough so that every item in it is visible and does not need to scroll?

    I have a panel with vbox and buttons in it, I need to do a animated scroll if some items is not visible, but I don't need that animation if every item is visible, I currently use

    Code:
    scroller.scrollBy(0, 10, true);
    But even when panel is big enough it still scrolls a bit and scroll back, I need param 3 to be true as I need animation.

  2. You can check the size of the scroller element:

    Code:
    var cntHeight    = container.element.getHeight(),
        scrollable   = container.getScrollable(),
        scroller     = scrollable.getScroller(),
        scrollHeight = scroller.getElement().getHeight();
    
    console.log(cntHeight, scrollHeight);

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Answers
    3447
    Vote Rating
    814
    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


    You can check the size of the scroller element:

    Code:
    var cntHeight    = container.element.getHeight(),
        scrollable   = container.getScrollable(),
        scroller     = scrollable.getScroller(),
        scrollHeight = scroller.getElement().getHeight();
    
    console.log(cntHeight, scrollHeight);
    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.

Thread Participants: 1

Tags for this Thread