mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 11:31:59 +08:00
Merge pull request #648 from zilongshanren/fix-scrollview-boundary-calculation
fix scrollView boundary calculation
This commit is contained in:
@@ -569,6 +569,7 @@ var ScrollView = cc.Class({
|
||||
var anchor = options.anchor;
|
||||
var applyToHorizontal = options.applyToHorizontal;
|
||||
var applyToVertical = options.applyToVertical;
|
||||
this._calculateBoundary();
|
||||
|
||||
anchor = cc.pClamp(anchor, cc.p(0, 0), cc.p(1, 1));
|
||||
|
||||
@@ -694,6 +695,7 @@ var ScrollView = cc.Class({
|
||||
|
||||
_handlePressLogic: function() {
|
||||
this._autoScrolling = false;
|
||||
this._calculateBoundary();
|
||||
|
||||
this._touchMovePreviousTimestamp = getTimeInMilliseconds();
|
||||
this._touchMoveDisplacements = [];
|
||||
|
||||
Reference in New Issue
Block a user