Skip to content

Commit 3844bfb

Browse files
committed
Refactor variable name
1 parent 64ff7a3 commit 3844bfb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: extensions/ccui/base-classes/UIScale9Sprite.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ ccui.Scale9Sprite = cc.Scale9Sprite = cc.Node.extend(/** @lends ccui.Scale9Sprit
208208
* Constructor function. override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
209209
* @function
210210
* @param {string|cc.SpriteFrame} file file name of texture or a SpriteFrame
211-
* @param {cc.Rect} rect
211+
* @param {cc.Rect} rectOrCapInsets
212212
* @param {cc.Rect} capInsets
213213
* @returns {Scale9Sprite}
214214
*/
215-
ctor: function (file, rect, capInsets) {
215+
ctor: function (file, rectOrCapInsets, capInsets) {
216216
cc.Node.prototype.ctor.call(this);
217217
this._spriteRect = cc.rect(0, 0, 0, 0);
218218
this._capInsetsInternal = cc.rect(0, 0, 0, 0);
@@ -224,13 +224,13 @@ ccui.Scale9Sprite = cc.Scale9Sprite = cc.Node.extend(/** @lends ccui.Scale9Sprit
224224

225225
if(file != undefined){
226226
if(file instanceof cc.SpriteFrame)
227-
this.initWithSpriteFrame(file, rect);
227+
this.initWithSpriteFrame(file, rectOrCapInsets);
228228
else{
229229
var frame = cc.spriteFrameCache.getSpriteFrame(file);
230230
if(frame != null)
231-
this.initWithSpriteFrame(frame, rect);
231+
this.initWithSpriteFrame(frame, rectOrCapInsets);
232232
else
233-
this.initWithFile(file, rect, capInsets);
233+
this.initWithFile(file, rectOrCapInsets, capInsets);
234234
}
235235
}else{
236236
this.init();

0 commit comments

Comments
 (0)