diff --git a/cocos2d/core/CCGame.js b/cocos2d/core/CCGame.js index 3fc1c13030..449ddb5556 100644 --- a/cocos2d/core/CCGame.js +++ b/cocos2d/core/CCGame.js @@ -562,7 +562,7 @@ var game = { } }; - window.requestAnimFrame(callback); + self._intervalId = window.requestAnimFrame(callback); self._paused = false; }, diff --git a/cocos2d/core/event/event-target.js b/cocos2d/core/event/event-target.js index 78b83f02bd..74bcaf57a5 100644 --- a/cocos2d/core/event/event-target.js +++ b/cocos2d/core/event/event-target.js @@ -260,10 +260,15 @@ JS.mixin(EventTarget.prototype, { }, /** - * !#en Removes all callbacks previously registered with the same target. - * !#zh 删除指定目标上的所有注册回调。 + * !#en Removes all callbacks previously registered with the same target (passed as parameter). + * This is not for removing all listeners in the current event target, + * and this is not for removing all listeners the target parameter have registered. + * It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + * !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + * 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + * 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 * @method targetOff - * @param {Object} target - The target to be searched for all related callbacks + * @param {Object} target - The target to be searched for all related listeners */ targetOff: function (target) { if (this._capturingListeners) { diff --git a/cocos2d/core/platform/CCSys.js b/cocos2d/core/platform/CCSys.js index 1ce1f4e72a..2be335fe17 100644 --- a/cocos2d/core/platform/CCSys.js +++ b/cocos2d/core/platform/CCSys.js @@ -618,7 +618,7 @@ else { sys.browserVersion = ""; /* Determine the browser version number */ (function(){ - var versionReg1 = /(micromessenger|qq|maxthon|baidu|sogou)(mobile)?(browser)?\/?([\d.]+)/i; + var versionReg1 = /(micromessenger|mqqbrowser|qq|maxthon|baidu|sogou)(mobile)?(browser)?\/?([\d.]+)/i; var versionReg2 = /(msie |rv:|firefox|chrome|ucbrowser|oupeng|opera|opr|safari|miui)(mobile)?(browser)?\/?([\d.]+)/i; var tmp = ua.match(versionReg1); if(!tmp) tmp = ua.match(versionReg2); diff --git a/cocos2d/core/platform/CCView.js b/cocos2d/core/platform/CCView.js index d18ab85f8d..755c884638 100644 --- a/cocos2d/core/platform/CCView.js +++ b/cocos2d/core/platform/CCView.js @@ -324,7 +324,7 @@ var View = cc._Class.extend({ var h = __BrowserGetter.availHeight(cc.game.frame); var isLandscape = w >= h; - if (CC_EDITOR || !this._orientationChanging || !cc.sys.isMobile || + if (CC_EDITOR || !cc.sys.isMobile || (isLandscape && this._orientation & cc.macro.ORIENTATION_LANDSCAPE) || (!isLandscape && this._orientation & cc.macro.ORIENTATION_PORTRAIT)) { locFrameSize.width = w; diff --git a/package.json b/package.json index f187433579..a40cff1341 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "gulp-size": "2.1.0", "gulp-sourcemaps": "1.5.2", "gulp-uglify": "1.5.3", - "gulp-uglify-harmony": "2.7.5", + "uglify-js-harmony": "2.7.5", "gulp-util": "3.0.6", "jshint-stylish": "2.1.0", "multipipe": "0.3.0",