Skip to content

Commit

Permalink
Merge pull request #50 from dabingnn/sprite-hotfix
Browse files Browse the repository at this point in the history
hotfix for scale9 sprite bug
  • Loading branch information
nantas committed Dec 15, 2015
2 parents 85e1b7d + 043266b commit 928bfa4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/ccui/base-classes/UIScale9Sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ ccui.Scale9Sprite = cc.Scale9Sprite = _ccsg.Node.extend(/** @lends ccui.Scale9Sp
initWithSpriteFrame : function(spriteFrame, capInsets){
if(!spriteFrame || !spriteFrame.getTexture())
throw new Error("ccui.Scale9Sprite.initWithSpriteFrame(): spriteFrame should be non-null and its texture should be non-null");

this._spriteRect = cc.rect(0,0,0,0);
this._originalSize = cc.size(0,0);
this._preferredSize = cc.size(0,0);

var locLoaded = spriteFrame.textureLoaded();

if(capInsets!== undefined) this._derivedCapInsets = capInsets;
Expand Down

0 comments on commit 928bfa4

Please sign in to comment.