1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    61
    Vote Rating
    0
    aguerra10 is on a distinguished road

      0  

    Default Reset Panel Scroll Position

    Reset Panel Scroll Position


    Hi,

    I am trying to reset the scroll position of a panel but cannot make it work.

    Here is my code:
    myPanel.getScrollable().getScroller().position = {x:0, y:0};

    This is definetly not working. What am I doing wrong?

    Thanks!!!

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    61
    Vote Rating
    0
    aguerra10 is on a distinguished road

      0  

    Default


    It seems that this code works but not completly. The scroll position goes back to the start once I scroll, but not automatically. Seems that some sort of "refresh", "update" or something like that method is missing.. This method must be being called when I scroll...

    Help please!!

    Thanks!!

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    9
    Vote Rating
    0
    vitorgomes is on a distinguished road

      0  

    Default Try this

    Try this


    Hi,
    I am also investigating how to control the scroller programatically and found this undocumented method in the source code. I am not sure if it's reliable to use though.
    Code:
    myPanel.getScrollable().getScroller().scrollToAnimated(0,0)
    Cheers
    Vitor

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Posts
    61
    Vote Rating
    0
    aguerra10 is on a distinguished road

      0  

    Default


    Hi Vitor,

    Unfortunately that did not work either, but thanks!! Still looking for a solution then..

    Cheers!!

    Agustin.

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    61
    Vote Rating
    0
    aguerra10 is on a distinguished road

      0  

    Default


    Hi,

    I just wanted to tell you that I've solved it.

    This code is working for me...

    Code:
    myPanel.getScrollable().getScroller().scrollTo({x: 0, y: 0}, true);
    myPanel.getScrollable().getScroller().refresh();
    Thanks!!

    Agustin.

  6. #6
    Sencha User aflx's Avatar
    Join Date
    Jun 2011
    Location
    Berlin, Germany
    Posts
    64
    Vote Rating
    0
    aflx is on a distinguished road

      0  

    Default


    Works great!
    Thank you.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar