fix rotated sprite Frame for canvas rendering

This commit is contained in:
Huabing.Xu
2016-07-29 13:56:56 +08:00
parent 937c0528c3
commit 2a4e2ddb79
+3 -2
View File
@@ -298,8 +298,9 @@ cc.SpriteFrame = cc.Class(/** @lends cc.SpriteFrame# */{
var tempTexture = new cc.Texture2D();
tempTexture.initWithElement(tempElement);
tempTexture.handleLoadedTexture();
// _refreshTexture will be recalled in setTexture
self.setTexture(tempTexture);
self._texture = tempTexture;
self._rotated = false;
self.setRect(cc.rect(0, 0, self._texture.width, self._texture.height));
return;
}
var w = texture.width, h = texture.height;