Skip to content

Commit 70752dd

Browse files
committed
Revert "Fixed a bug that sprite update color terminated unexpectedly"
1 parent 3cba083 commit 70752dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cocos2d/core/sprites/CCSprite.js

+4
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,10 @@ if (cc._renderType === cc._RENDER_TYPE_CANVAS) {
14911491
_p.updateDisplayedColor = function (parentColor) {
14921492
var _t = this;
14931493
cc.Node.prototype.updateDisplayedColor.call(_t, parentColor);
1494+
var oColor = _t._oldDisplayColor;
1495+
var nColor = _t._displayedColor;
1496+
if (oColor.r === nColor.r && oColor.g === nColor.g && oColor.b === nColor.b)
1497+
return;
14941498

14951499
_t._changeTextureColor();
14961500
_t._setNodeDirtyForCache();

0 commit comments

Comments
 (0)