Merge pull request #731 from zilongshanren/fixScrollViewEvent

fix a minor bug of scrollview event
This commit is contained in:
Jare Guo
2016-05-25 17:16:07 +08:00
+2 -2
View File
@@ -783,7 +783,7 @@ var ScrollView = cc.Class({
realMove = cc.pAdd(realMove, outOfBoundary);
}
var scrollEventType = '';
var scrollEventType = -1;
if (realMove.y > 0) { //up
var icBottomPos = this.content.y - this.content.anchorY * this.content.height;
@@ -819,7 +819,7 @@ var ScrollView = cc.Class({
this._dispatchEvent(EventType.SCROLLING);
}
if (scrollEventType) {
if (scrollEventType !== -1) {
this._dispatchEvent(scrollEventType);
}