Skip to content

Commit d6d978a

Browse files
committed
Merge pull request cocos2d#1290 from dingpinglv/Iss3327_FixSpriteSetColor
Closed cocos2d#3327: A cc.Sprite's bug has been fixed
2 parents a8ce229 + e171409 commit d6d978a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/sprite_nodes/CCSprite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ cc.generateTintImage = function (texture, tintedImgCache, color, rect, renderCan
207207
ctx.drawImage(tintedImgCache[2], rect.x, rect.y, w, h, 0, 0, w, h);
208208
}
209209

210-
if (((selColor.r === 0) && (selColor.g === 0) && (selColor.b === 0)) || (selColor.r + selColor.g + selColor.b < 255)) {
210+
if (selColor.r + selColor.g + selColor.b < 255) {
211211
ctx.globalAlpha = a;
212212
ctx.drawImage(tintedImgCache[3], rect.x, rect.y, w, h, 0, 0, w, h);
213213
}

0 commit comments

Comments
 (0)