mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 09:32:38 +08:00
Merge pull request #1049 from zilongshanren/fix-issue-4026
fix outOfBoundary when scrollview size changed
This commit is contained in:
@@ -813,6 +813,7 @@ var ScrollView = cc.Class({
|
||||
}
|
||||
|
||||
this._moveContent(moveDelta);
|
||||
this._adjustContentOutOfBoundary();
|
||||
},
|
||||
|
||||
_calculateBoundary: function() {
|
||||
@@ -1331,6 +1332,7 @@ var ScrollView = cc.Class({
|
||||
var newPosition = cc.pAdd(this.getContentPosition(), outOfBoundary);
|
||||
if(this.content) {
|
||||
this.content.setPosition(newPosition);
|
||||
this._updateScrollBar(0);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user