diff --git a/cocos2d/audio/CCAudio.js b/cocos2d/audio/CCAudio.js index a34a3a30c9..f3cf247b6e 100644 --- a/cocos2d/audio/CCAudio.js +++ b/cocos2d/audio/CCAudio.js @@ -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; diff --git a/cocos2d/core/components/CCScrollView.js b/cocos2d/core/components/CCScrollView.js index 233a30b58d..2fe85cc83d 100644 --- a/cocos2d/core/components/CCScrollView.js +++ b/cocos2d/core/components/CCScrollView.js @@ -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; diff --git a/cocos2d/core/platform/CCSys.js b/cocos2d/core/platform/CCSys.js index ddf81a20fd..87c98f7ed1 100644 --- a/cocos2d/core/platform/CCSys.js +++ b/cocos2d/core/platform/CCSys.js @@ -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 {