Skip to content

Commit

Permalink
publish build
Browse files Browse the repository at this point in the history
  • Loading branch information
AmyFoxFN committed Jan 4, 2018
1 parent e75963e commit 07b0150
Show file tree
Hide file tree
Showing 16 changed files with 176 additions and 145 deletions.
4 changes: 2 additions & 2 deletions lib/better-scroll/better-scroll.min.js

Large diffs are not rendered by default.

31 changes: 18 additions & 13 deletions lib/better-scroll/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/*!
* better-normal-scroll v1.7.0
* better-normal-scroll v1.7.2
* (c) 2016-2018 ustbhuangyi
* Released under the MIT License.
*/
Expand Down Expand Up @@ -1253,6 +1253,7 @@ function coreMixin(BScroll) {
var pos = me.getComputedPosition();
me.trigger('scroll', pos);
if (!me.isInTransition) {
me.trigger('scrollEnd', pos);
return;
}
me.probeTimer = requestAnimationFrame(probe);
Expand Down Expand Up @@ -1307,10 +1308,12 @@ function coreMixin(BScroll) {
this._transitionTime();
if (!this.pulling && !this.resetPosition(this.options.bounceTime, ease.bounce)) {
this.isInTransition = false;
this.trigger('scrollEnd', {
x: this.x,
y: this.y
});
if (this.options.probeType !== 3) {
this.trigger('scrollEnd', {
x: this.x,
y: this.y
});
}
}
};

Expand Down Expand Up @@ -2174,9 +2177,6 @@ function pullUpMixin(BScroll) {
};

BScroll.prototype._watchPullUp = function () {
if (this.pullupWatching) {
return;
}
this.pullupWatching = true;
var _options$pullUpLoad$t = this.options.pullUpLoad.threshold,
threshold = _options$pullUpLoad$t === undefined ? 0 : _options$pullUpLoad$t;
Expand All @@ -2185,20 +2185,25 @@ function pullUpMixin(BScroll) {
this.on('scroll', checkToEnd);

function checkToEnd(pos) {
var _this = this;

if (this.movingDirectionY === DIRECTION_UP && pos.y <= this.maxScrollY + threshold) {
this.pullupWatching = false;
// reset pullupWatching status after scroll end.
this.once('scrollEnd', function () {
_this.pullupWatching = false;
});
this.trigger('pullingUp');
this.off('scroll', checkToEnd);
}
}
};

BScroll.prototype.finishPullUp = function () {
var _this = this;
var _this2 = this;

if (this.isInTransition) {
if (this.pullupWatching) {
this.once('scrollEnd', function () {
_this._watchPullUp();
_this2._watchPullUp();
});
} else {
this._watchPullUp();
Expand Down Expand Up @@ -2230,7 +2235,7 @@ scrollbarMixin(BScroll);
pullDownMixin(BScroll);
pullUpMixin(BScroll);

BScroll.Version = '1.7.0';
BScroll.Version = '1.7.2';

/* harmony default export */ __webpack_exports__["default"] = (BScroll);

Expand Down
4 changes: 2 additions & 2 deletions lib/cascade-picker/cascade-picker.min.js

Large diffs are not rendered by default.

31 changes: 18 additions & 13 deletions lib/cascade-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/*!
* better-normal-scroll v1.7.0
* better-normal-scroll v1.7.2
* (c) 2016-2018 ustbhuangyi
* Released under the MIT License.
*/
Expand Down Expand Up @@ -2438,6 +2438,7 @@ function coreMixin(BScroll) {
var pos = me.getComputedPosition();
me.trigger('scroll', pos);
if (!me.isInTransition) {
me.trigger('scrollEnd', pos);
return;
}
me.probeTimer = requestAnimationFrame(probe);
Expand Down Expand Up @@ -2492,10 +2493,12 @@ function coreMixin(BScroll) {
this._transitionTime();
if (!this.pulling && !this.resetPosition(this.options.bounceTime, ease.bounce)) {
this.isInTransition = false;
this.trigger('scrollEnd', {
x: this.x,
y: this.y
});
if (this.options.probeType !== 3) {
this.trigger('scrollEnd', {
x: this.x,
y: this.y
});
}
}
};

Expand Down Expand Up @@ -3359,9 +3362,6 @@ function pullUpMixin(BScroll) {
};

BScroll.prototype._watchPullUp = function () {
if (this.pullupWatching) {
return;
}
this.pullupWatching = true;
var _options$pullUpLoad$t = this.options.pullUpLoad.threshold,
threshold = _options$pullUpLoad$t === undefined ? 0 : _options$pullUpLoad$t;
Expand All @@ -3370,20 +3370,25 @@ function pullUpMixin(BScroll) {
this.on('scroll', checkToEnd);

function checkToEnd(pos) {
var _this = this;

if (this.movingDirectionY === DIRECTION_UP && pos.y <= this.maxScrollY + threshold) {
this.pullupWatching = false;
// reset pullupWatching status after scroll end.
this.once('scrollEnd', function () {
_this.pullupWatching = false;
});
this.trigger('pullingUp');
this.off('scroll', checkToEnd);
}
}
};

BScroll.prototype.finishPullUp = function () {
var _this = this;
var _this2 = this;

if (this.isInTransition) {
if (this.pullupWatching) {
this.once('scrollEnd', function () {
_this._watchPullUp();
_this2._watchPullUp();
});
} else {
this._watchPullUp();
Expand Down Expand Up @@ -3415,7 +3420,7 @@ scrollbarMixin(BScroll);
pullDownMixin(BScroll);
pullUpMixin(BScroll);

BScroll.Version = '1.7.0';
BScroll.Version = '1.7.2';

/* harmony default export */ __webpack_exports__["default"] = (BScroll);

Expand Down
4 changes: 2 additions & 2 deletions lib/cube.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/index-list/index-list.min.js

Large diffs are not rendered by default.

44 changes: 23 additions & 21 deletions lib/index-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ module.exports = function (it, tag, stat) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/*!
* better-normal-scroll v1.7.0
* better-normal-scroll v1.7.2
* (c) 2016-2018 ustbhuangyi
* Released under the MIT License.
*/
Expand Down Expand Up @@ -1906,6 +1906,7 @@ function coreMixin(BScroll) {
var pos = me.getComputedPosition();
me.trigger('scroll', pos);
if (!me.isInTransition) {
me.trigger('scrollEnd', pos);
return;
}
me.probeTimer = requestAnimationFrame(probe);
Expand Down Expand Up @@ -1960,10 +1961,12 @@ function coreMixin(BScroll) {
this._transitionTime();
if (!this.pulling && !this.resetPosition(this.options.bounceTime, ease.bounce)) {
this.isInTransition = false;
this.trigger('scrollEnd', {
x: this.x,
y: this.y
});
if (this.options.probeType !== 3) {
this.trigger('scrollEnd', {
x: this.x,
y: this.y
});
}
}
};

Expand Down Expand Up @@ -2827,9 +2830,6 @@ function pullUpMixin(BScroll) {
};

BScroll.prototype._watchPullUp = function () {
if (this.pullupWatching) {
return;
}
this.pullupWatching = true;
var _options$pullUpLoad$t = this.options.pullUpLoad.threshold,
threshold = _options$pullUpLoad$t === undefined ? 0 : _options$pullUpLoad$t;
Expand All @@ -2838,20 +2838,25 @@ function pullUpMixin(BScroll) {
this.on('scroll', checkToEnd);

function checkToEnd(pos) {
var _this = this;

if (this.movingDirectionY === DIRECTION_UP && pos.y <= this.maxScrollY + threshold) {
this.pullupWatching = false;
// reset pullupWatching status after scroll end.
this.once('scrollEnd', function () {
_this.pullupWatching = false;
});
this.trigger('pullingUp');
this.off('scroll', checkToEnd);
}
}
};

BScroll.prototype.finishPullUp = function () {
var _this = this;
var _this2 = this;

if (this.isInTransition) {
if (this.pullupWatching) {
this.once('scrollEnd', function () {
_this._watchPullUp();
_this2._watchPullUp();
});
} else {
this._watchPullUp();
Expand Down Expand Up @@ -2883,7 +2888,7 @@ scrollbarMixin(BScroll);
pullDownMixin(BScroll);
pullUpMixin(BScroll);

BScroll.Version = '1.7.0';
BScroll.Version = '1.7.2';

/* harmony default export */ __webpack_exports__["default"] = (BScroll);

Expand Down Expand Up @@ -3756,7 +3761,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
data: function data() {
return {
beforePullDown: true,
isRebounding: false,
isPullingDown: false,
isPullUpLoad: false,
pullUpDirty: true,
Expand Down Expand Up @@ -3860,15 +3864,15 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
if (this.pullDownRefresh && this.isPullingDown) {
this.isPullingDown = false;
this._reboundPullDown().then(function () {
_this3._afterPullDown();
_this3._afterPullDown(dirty);
});
} else if (this.pullUpLoad && this.isPullUpLoad) {
this.isPullUpLoad = false;
this.scroll.finishPullUp();
this.pullUpDirty = dirty;
this.refresh();
dirty && this.refresh();
} else {
this.refresh();
dirty && this.refresh();
}
},
_calculateMinHeight: function _calculateMinHeight() {
Expand Down Expand Up @@ -3911,21 +3915,19 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_

return new _promise2.default(function (resolve) {
setTimeout(function () {
_this6.isRebounding = true;
_this6.scroll.finishPullDown();
_this6.isPullingDown = false;
resolve();
}, stopTime);
});
},
_afterPullDown: function _afterPullDown() {
_afterPullDown: function _afterPullDown(dirty) {
var _this7 = this;

setTimeout(function () {
_this7.pullDownStyle = 'top:' + _this7.pullDownInitTop + 'px';
_this7.beforePullDown = true;
_this7.isRebounding = false;
_this7.refresh();
dirty && _this7.refresh();
}, this.scroll.options.bounceTime);
}
},
Expand Down
Loading

0 comments on commit 07b0150

Please sign in to comment.