From 951169ca6634dd8c0fce86e50d3aefafa5921a5a Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Mon, 9 May 2016 10:06:49 +0800 Subject: [PATCH] fix scrollView boundary calculation --- cocos2d/core/components/CCScrollView.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cocos2d/core/components/CCScrollView.js b/cocos2d/core/components/CCScrollView.js index 8d005b209d..ad2945b61f 100644 --- a/cocos2d/core/components/CCScrollView.js +++ b/cocos2d/core/components/CCScrollView.js @@ -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 = [];