Merge branch 'v1.9'

This commit is contained in:
Jare Guo
2018-05-28 10:36:34 +08:00
3 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ Audio.State = {
};
proto.resume = function () {
if (!this._element || this._element.currentTime === 0) return;
if (!this._element || this._state === Audio.State.PLAYING) return;
this._bindEnded();
this._element.play();
this._state = Audio.State.PLAYING;
+2 -6
View File
@@ -1246,8 +1246,8 @@ var ScrollView = cc.Class({
this._autoScrolling = false;
}
var contentPos = cc.pSub(newPosition, this.getContentPosition());
this._moveContent(contentPos, reachedEnd);
var deltaMove = cc.pSub(newPosition, this.getContentPosition());
this._moveContent(this._clampDelta(deltaMove), reachedEnd);
this._dispatchEvent('scrolling');
if (!this._autoScrolling) {
@@ -1335,7 +1335,6 @@ var ScrollView = cc.Class({
this._autoScrollBraking = true;
}
}
},
_calculateTouchMoveVelocity: function() {
@@ -1366,7 +1365,6 @@ var ScrollView = cc.Class({
_moveContent: function(deltaMove, canStartBounceBack) {
var adjustedMove = this._flattenVectorByDirection(deltaMove);
var newPosition = cc.pAdd(this.getContentPosition(), adjustedMove);
this.setContentPosition(newPosition);
@@ -1377,10 +1375,8 @@ var ScrollView = cc.Class({
if (this.elastic && canStartBounceBack) {
this._startBounceBackIfNeeded();
}
},
_getContentLeftBoundary: function() {
var contentPos = this.getContentPosition();
var leftBoundary = contentPos.x - this.content.getAnchorPoint().x * this.content.getContentSize().width;
+1 -1
View File
@@ -643,7 +643,7 @@ else if (CC_WECHATGAME) {
sys.osVersion = version[0];
sys.osMainVersion = parseInt(sys.osVersion);
// wechagame subdomain
if (wx.getGroupCloudStorage && wx.getFriendCloudStorage) {
if (!wx.getFileSystemManager) {
sys.browserType = sys.BROWSER_TYPE_WECHAT_GAME_SUB;
}
else {