版本 2.3.3
问题如题
使用这种方法 scrollView.scrollTo(cc.v2(0, 0))
scrollView.scrollToBottom()
我尝试了是cc.v2(0,0),我确认了文档里面1代表滚动至底部,我只是确认一下这里是否文档错误或者是个bug

我认为是文档注释的 bug。
我看了 scrollToBottom 的源码,里面给的值是 cc.v2(0,0)。
scrollToBottom (timeInSecond, attenuated) {
let moveDelta = this._calculateMovePercentDelta({
anchor: cc.v2(0, 0),
applyToHorizontal: false,
applyToVertical: true,
});
if (timeInSecond) {
this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);
} else {
this._moveContent(moveDelta, true);
}
},
并且,参数描述为:
anchorVec2 A point which will be clamp between cc.v2(0,0) and cc.v2(1,1).
如果是anchor的话,左下角为(0,0),右上角为(1,1)。
如果是以滚动条里单个item 这个百分比要怎么计算