mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
@@ -562,7 +562,7 @@ var game = {
|
||||
}
|
||||
};
|
||||
|
||||
window.requestAnimFrame(callback);
|
||||
self._intervalId = window.requestAnimFrame(callback);
|
||||
self._paused = false;
|
||||
},
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user