diff --git a/cocos2d/core/CCNode.js b/cocos2d/core/CCNode.js index 88dd149def..4dd4fe4e3e 100644 --- a/cocos2d/core/CCNode.js +++ b/cocos2d/core/CCNode.js @@ -2963,8 +2963,13 @@ var Node = cc.Class({ this._renderFlag |= RenderFlow.FLAG_TRANSFORM; if (this._renderComponent) { - this._renderFlag |= RenderFlow.FLAG_COLOR; - this._renderComponent.markForUpdateRenderData(true); + if (this._renderComponent.enabled) { + this._renderFlag |= RenderFlow.FLAG_COLOR; + this._renderComponent.markForUpdateRenderData(true); + } + else { + this._renderComponent.disableRender(); + } } }, diff --git a/cocos2d/core/components/CCMask.js b/cocos2d/core/components/CCMask.js index f12a524fa6..2402af7378 100644 --- a/cocos2d/core/components/CCMask.js +++ b/cocos2d/core/components/CCMask.js @@ -375,6 +375,7 @@ let Mask = cc.Class({ }, onDisable () { + this._super(); this.node._renderFlag &= ~(RenderFlow.FLAG_POST_RENDER | RenderFlow.FLAG_POST_UPDATE_RENDER_DATA); }, diff --git a/cocos2d/core/components/editbox/CCEditBox.js b/cocos2d/core/components/editbox/CCEditBox.js index 439871f93b..ed3c43e55b 100644 --- a/cocos2d/core/components/editbox/CCEditBox.js +++ b/cocos2d/core/components/editbox/CCEditBox.js @@ -385,11 +385,13 @@ let EditBox = cc.Class({ if (this.inputMode === InputMode.ANY){ placeholderLabel.verticalAlign = macro.VerticalTextAlignment.TOP; + placeholderLabel.enableWrapText = true; textLabel.verticalAlign = macro.VerticalTextAlignment.TOP; textLabel.enableWrapText = true; } else { placeholderLabel.verticalAlign = macro.VerticalTextAlignment.CENTER; + placeholderLabel.enableWrapText = false; textLabel.verticalAlign = macro.VerticalTextAlignment.CENTER; textLabel.enableWrapText = false; } diff --git a/cocos2d/core/physics/CCPhysicsManager.js b/cocos2d/core/physics/CCPhysicsManager.js index aebb29d899..1760fff46b 100644 --- a/cocos2d/core/physics/CCPhysicsManager.js +++ b/cocos2d/core/physics/CCPhysicsManager.js @@ -549,6 +549,8 @@ cc.js.getset(PhysicsManager.prototype, 'enabled', return this._enabled; }, function (value) { + if (CC_EDITOR) return; + if (value && !this._world) { var world = new b2.World( new b2.Vec2(0, -10) ); world.SetAllowSleeping(true); diff --git a/cocos2d/core/platform/CCSys.js b/cocos2d/core/platform/CCSys.js index abb41a855f..7fddf004be 100644 --- a/cocos2d/core/platform/CCSys.js +++ b/cocos2d/core/platform/CCSys.js @@ -609,6 +609,7 @@ function initSys () { sys.os = sys.OS_IOS; } else if (env.platform === 'devtools') { + sys.isMobile = false; if (system.indexOf('android') > -1) { sys.os = sys.OS_ANDROID; } diff --git a/cocos2d/core/renderer/utils/dynamic-atlas/manager.js b/cocos2d/core/renderer/utils/dynamic-atlas/manager.js index 8f8c5fa20c..196b3c7940 100644 --- a/cocos2d/core/renderer/utils/dynamic-atlas/manager.js +++ b/cocos2d/core/renderer/utils/dynamic-atlas/manager.js @@ -108,6 +108,8 @@ let dynamicAtlasManager = { !spriteFrame || spriteFrame._original) return; let texture = spriteFrame._texture; + if (texture instanceof cc.RenderTexture) return; + let w = texture.width, h = texture.height; let min = texture._minFilter, mag = texture._magFilter; let LINEAR = cc.Texture2D.Filter.LINEAR; diff --git a/cocos2d/core/renderer/webgl/assemblers/motion-streak.js b/cocos2d/core/renderer/webgl/assemblers/motion-streak.js index f4dbd8fe27..6c15e82ffd 100644 --- a/cocos2d/core/renderer/webgl/assemblers/motion-streak.js +++ b/cocos2d/core/renderer/webgl/assemblers/motion-streak.js @@ -111,8 +111,8 @@ var motionStreakAssembler = { let cur; if (points.length > 1) { - let difx = points[0].x - tx; - let dify = points[0].y - ty; + let difx = points[0].point.x - tx; + let dify = points[0].point.y - ty; if ((difx*difx + dify*dify) < comp.minSeg) { cur = points[0]; } @@ -124,7 +124,7 @@ var motionStreakAssembler = { } cur.setPoint(tx, ty); - cur.time = comp._fadeTime; + cur.time = comp._fadeTime + dt; renderData.dataLength = 0; if (points.length < 2) {