Sencha Touch、ExtJS6 Modern、ExtJS 和 ExtJS6 Classic 滾動容器到頂部的方法都不相同
Sencha Touch:
container.getScrollable().getScroller().scrollTo(x, y[, animation])
其中
-
container
是
Container/Panel/List
等控件類的執行個體
-
x
是x坐标
-
y
是y坐标,滾動到頂部,就設定
y
為0
-
animation
是可選參數,表示滾動時是否有動畫效果(
true
有動畫,
false
無動畫)
以下同理。
ExtJS6 Modern:
container.getScrollable().scrollTo(x, y[, animation])
ExtJS 和 ExtJS6 Classic:
container.scrollTo(x, y[, animation])