diff --git a/CCBoot.js b/CCBoot.js index f1aca8bcf2..a366001d74 100644 --- a/CCBoot.js +++ b/CCBoot.js @@ -1758,7 +1758,7 @@ var _initSys = function () { sys.browserVersion = ""; /* Determine the browser version number */ (function(){ - var versionReg1 = /(mqqbrowser|micromessenger|sogou|qzone|liebao|maxthon|baidu)(mobile)?(browser)?\/?([\d.]+)/i; + var versionReg1 = /(mqqbrowser|micromessenger|sogou|qzone|liebao|maxthon|mxbrowser|baidu)(mobile)?(browser)?\/?([\d.]+)/i; var versionReg2 = /(msie |rv:|firefox|chrome|ucbrowser|qq|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/CCConfig.js b/cocos2d/core/platform/CCConfig.js index 920ef69528..4fb22921f8 100644 --- a/cocos2d/core/platform/CCConfig.js +++ b/cocos2d/core/platform/CCConfig.js @@ -31,7 +31,7 @@ * @type {String} * @name cc.ENGINE_VERSION */ -window["CocosEngine"] = cc.ENGINE_VERSION = "Cocos2d-JS v3.14"; +window["CocosEngine"] = cc.ENGINE_VERSION = "Cocos2d-JS v3.15"; /** *
diff --git a/cocos2d/core/platform/CCEGLView.js b/cocos2d/core/platform/CCEGLView.js
index 68feb552e2..6093dc0b04 100755
--- a/cocos2d/core/platform/CCEGLView.js
+++ b/cocos2d/core/platform/CCEGLView.js
@@ -194,6 +194,9 @@ cc.EGLView = cc.Class.extend(/** @lends cc.view# */{
} else {
view = cc.view;
}
+ if (view._orientationChanging) {
+ return;
+ }
// Check frame size changed or not
var prevFrameW = view._frameSize.width, prevFrameH = view._frameSize.height, prevRotated = view._isRotated;
@@ -229,7 +232,13 @@ cc.EGLView = cc.Class.extend(/** @lends cc.view# */{
_orientationChange: function () {
cc.view._orientationChanging = true;
- cc.view._resizeEvent();
+ if (cc.sys.isMobile) {
+ cc.game.container.style.display = "none";
+ }
+ setTimeout(function () {
+ cc.view._orientationChanging = false;
+ cc.view._resizeEvent();
+ }, 300);
},
/**
@@ -348,11 +357,6 @@ cc.EGLView = cc.Class.extend(/** @lends cc.view# */{
cc.container.style.transformOrigin = '0px 0px 0px';
this._isRotated = true;
}
- if (this._orientationChanging) {
- setTimeout(function () {
- cc.view._orientationChanging = false;
- }, 1000);
- }
},
// hack
@@ -676,8 +680,6 @@ cc.EGLView = cc.Class.extend(/** @lends cc.view# */{
if (cc.sys.isMobile)
this._adjustViewportMeta();
- // Permit to re-detect the orientation of device.
- this._orientationChanging = true;
// If resizing, then frame size is already initialized, this logic should be improved
if (!this._resizing)
this._initFrameSize();
diff --git a/tools/build.xml b/tools/build.xml
index d59cb38233..519f9867e9 100644
--- a/tools/build.xml
+++ b/tools/build.xml
@@ -5,9 +5,9 @@
classpath="./compiler/compiler.jar"/>