开发者

scroller.scrollTo in Sencha Touch don't work if not launched manually just before

开发者 https://www.devze.com 2023-03-14 18:47 出处:网络
I encounter a problem when i want to use the scrollTo function of the scroller component. When i execute this command (by a button located on an another panel) :

I encounter a problem when i want to use the scrollTo function of the scroller component.

When i execute this command (by a button located on an another panel) :

开发者_运维技巧
myPanel.scroller.scrollTo({x: 0, y: 200}, true);

My panel is scrolling only if just before, i have scroll it manually by touching the screen. It's like i have lost focus on the scroller.

Someone have an idea of where is the problem ?

Thank you.


That's because the scoller doesn't know the boundaries of its wrapped widget.

Solution:

 if (myPanel.scroller.offsetBoundary.top == 0) {
        myPanel.scroller.updateBoundary();
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消