Skip to content

Commit d8f0fbd

Browse files
committed
Merge pull request #1142 from dingpinglv/Iss2803_V2.1.6Release
Issue #2803: fixed a bug for cc.Sprite that its drawing doesn't work when _rect's width or height greater than 0 and less than 1.
2 parents 1e3b427 + 6c5b882 commit d8f0fbd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.txt

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Cocos2d-html5-v2.1.6 @ Sep.19, 2013
2323
9. Fixed a bug of cc.LayerColor that represent incorrect opacity passed into init method
2424
10. Stop listening and remove the event for HtmlImageElement object onload
2525
11. Fixed cc.ProgressTimer display wrong when its sprite was flipped
26+
12. Fixed some bugs for actions that set their object property through reference when initiating actions.
2627

2728
* Known Issues:
2829
1. Effect Advanced Lens3D doesn't work

cocos2d/sprite_nodes/CCSprite.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2003,11 +2003,11 @@ cc.Sprite = cc.NodeRGBA.extend(/** @lends cc.Sprite# */{
20032003
if (this._colorized) {
20042004
context.drawImage(image,
20052005
0, 0, 0 | locRect.width, 0 | locRect.height,
2006-
flipXOffset, flipYOffset, locRect.width, locRect.height);
2006+
flipXOffset, flipYOffset, 0 | locRect.width, 0 | locRect.height);
20072007
} else {
20082008
context.drawImage(image,
20092009
0 | locRect.x, 0 | locRect.y, 0 | locRect.width, 0 | locRect.height,
2010-
flipXOffset, flipYOffset, locRect.width, locRect.height);
2010+
flipXOffset, flipYOffset, 0 | locRect.width, 0 | locRect.height);
20112011
}
20122012
} else if (locContentSize.width !== 0) {
20132013
var curColor = this.getColor();

0 commit comments

Comments
 (0)