diff --git a/cocos2d/core/CCDebug.js b/cocos2d/core/CCDebug.js index a11c8e2e05..3f6d264209 100644 --- a/cocos2d/core/CCDebug.js +++ b/cocos2d/core/CCDebug.js @@ -266,7 +266,7 @@ cc.assertID = function (cond) { * !#zh 调试模式 * @enum debug.DebugMode * @memberof cc - */ + */ var DebugMode = cc.Enum({ /** * !#en The debug mode none. diff --git a/cocos2d/core/base-ui/CCWidgetManager.js b/cocos2d/core/base-ui/CCWidgetManager.js index 79077bd0e1..5bbf5785f8 100644 --- a/cocos2d/core/base-ui/CCWidgetManager.js +++ b/cocos2d/core/base-ui/CCWidgetManager.js @@ -267,8 +267,9 @@ function refreshScene () { // check animation editor if (CC_EDITOR && !Editor.isBuilder) { var AnimUtils = Editor.require('scene://utils/animation'); - if (AnimUtils) { - var nowPreviewing = !!AnimUtils.Cache.animation; + var EditMode = Editor.require('scene://edit-mode'); + if (AnimUtils && EditMode) { + var nowPreviewing = (EditMode.curMode().name === 'animation' && !!AnimUtils.Cache.animation); if (nowPreviewing !== animationState.previewing) { animationState.previewing = nowPreviewing; if (nowPreviewing) { diff --git a/cocos2d/deprecated.js b/cocos2d/deprecated.js index 6d3b4536da..b6632e1270 100644 --- a/cocos2d/deprecated.js +++ b/cocos2d/deprecated.js @@ -138,7 +138,7 @@ if (CC_DEBUG) { cc.warn('Sorry, %s.%s is deprecated. Please use %s instead', ownerName, propName, obj[propName]); return originFunc.apply(this, arguments); } - + ownerCtor[propName] = warn; })(); } @@ -438,7 +438,7 @@ if (CC_DEBUG) { // Vec2 pointEqualToPoint: 'cc.Vec2 equals', - + // Size sizeEqualToSize: 'cc.Size equals', @@ -580,7 +580,7 @@ if (CC_DEBUG) { cc.errorID(1407); return js.Pool; }); - + // cc.isChildClassOf js.get(cc, 'isChildClassOf', function () { cc.errorID(1400, 'cc.isChildClassOf', 'cc.js.isChildClassOf');