From 46fc08c8fe58df5c7cf76c7ff2b2e4245c7e4eb8 Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Wed, 3 Aug 2016 17:29:56 +0800 Subject: [PATCH 1/2] fix button color transition interactive=false --- cocos2d/core/components/CCButton.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cocos2d/core/components/CCButton.js b/cocos2d/core/components/CCButton.js index dd7b2d5680..b9a69d0d17 100644 --- a/cocos2d/core/components/CCButton.js +++ b/cocos2d/core/components/CCButton.js @@ -103,6 +103,12 @@ var Button = cc.Class({ ctor: function () { this._resetState(); + + this._fromColor = null; + this._toColor = null; + this._time = 0; + this._transitionFinished = true; + this._sprite = null; if(CC_EDITOR) { @@ -114,10 +120,6 @@ var Button = cc.Class({ this._pressed = false; this._hovered = false; - this._fromColor = null; - this._toColor = null; - this._time = 0; - this._transitionFinished = true; }, editor: CC_EDITOR && { From ce3382ed3b5749547fa124bf1a14788f04c77554 Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Wed, 3 Aug 2016 17:42:14 +0800 Subject: [PATCH 2/2] add async decencies to package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 8071bae5fc..e506a21978 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "gulp-rename": "1.2.2", "gulp-shell": "0.4.1", "gulp-size": "2.1.0", + "async": "1.5.2", "gulp-sourcemaps": "1.5.2", "gulp-uglify": "1.5.3", "gulp-util": "3.0.6",