Skip to content

Commit 3c71278

Browse files
committed
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-html5 into Iss2760_Spine
2 parents 536d07a + a88060f commit 3c71278

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

extensions/ccui/base-classes/UIScale9Sprite.js

-9
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,6 @@ ccui.Scale9Sprite = cc.Node.extend(/** @lends ccui.Scale9Sprite# */{
466466
this._textureLoaded = locLoaded;
467467
if(!locLoaded){
468468
texture.addEventListener("load", function(sender){
469-
if(this._capInsets.width === 0 && this._capInsets.height === 0){
470-
this._capInsets.width = sender._contentSize.width;
471-
this._capInsets.height = sender._contentSize.height;
472-
}
473469
// the texture is rotated on Canvas render mode, so isRotated always is false.
474470
var preferredSize = this._preferredSize;
475471
preferredSize = cc.size(preferredSize.width, preferredSize.height);
@@ -479,11 +475,6 @@ ccui.Scale9Sprite = cc.Node.extend(/** @lends ccui.Scale9Sprite# */{
479475
this._positionsAreDirty = true;
480476
this.dispatchEvent("load");
481477
}, this);
482-
}else{
483-
if(this._capInsets.width === 0 && this._capInsets.height === 0){
484-
capInsets.width = texture._contentSize.width;
485-
capInsets.height = texture._contentSize.height;
486-
}
487478
}
488479

489480
return this.initWithBatchNode(new cc.SpriteBatchNode(file, 9), rect, false, capInsets);

extensions/gui/control-extension/CCScale9Sprite.js

-9
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,6 @@ cc.Scale9Sprite = cc.Node.extend(/** @lends cc.Scale9Sprite# */{
461461
this._textureLoaded = locLoaded;
462462
if(!locLoaded){
463463
texture.addEventListener("load", function(sender){
464-
if(this._capInsets.width === 0 && this._capInsets.height === 0){
465-
this._capInsets.width = sender._contentSize.width;
466-
this._capInsets.height = sender._contentSize.height;
467-
}
468464
// the texture is rotated on Canvas render mode, so isRotated always is false.
469465
var preferredSize = this._preferredSize;
470466
preferredSize = cc.size(preferredSize.width, preferredSize.height);
@@ -474,11 +470,6 @@ cc.Scale9Sprite = cc.Node.extend(/** @lends cc.Scale9Sprite# */{
474470
this._positionsAreDirty = true;
475471
this.dispatchEvent("load");
476472
}, this);
477-
}else{
478-
if(this._capInsets.width === 0 && this._capInsets.height === 0){
479-
capInsets.width = texture._contentSize.width;
480-
capInsets.height = texture._contentSize.height;
481-
}
482473
}
483474

484475
return this.initWithBatchNode(new cc.SpriteBatchNode(file, 9), rect, false, capInsets);

0 commit comments

Comments
 (0)