下面这个 是上拉加载的实现方法,当if条件为真时,会触发 回调(this.scroll.trigger(PULL_UP_HOOKS_NAME)),就是没有看明白this.scroll.movingDirectionY一直都是0,是在什么时候变成1的?
还有 this.scroll.maxScrollY 是怎么更新的?
`PullUp.prototype.checkPullUp = function (pos) {
var _this = this;
var threshold = this.options.threshold;
if (this.scroll.movingDirectionY === 1 /* Positive */ &&
pos.y <= this.scroll.maxScrollY + threshold) {
this.pulling = true;
// must reset pulling after scrollEnd
this.scroll.once(this.scroll.eventTypes.scrollEnd, function () {
_this.pulling = false;
});
this.unwatch();
this.scroll.trigger(PULL_UP_HOOKS_NAME);
}
};`