Merge pull request #1714 from jareguo/v1.5

fix clone SpriteFrame on native
This commit is contained in:
Wang Nan
2017-06-08 16:13:46 +08:00
committed by GitHub
+11
View File
@@ -268,6 +268,17 @@ prototype.getTexture = function () {
return tex;
};
prototype._clone = prototype.clone;
prototype.clone = function () {
var cloned = this._clone();
cloned._name = this._name;
cloned.insetTop = this.insetTop;
cloned.insetBottom = this.insetBottom;
cloned.insetLeft = this.insetLeft;
cloned.insetRight = this.insetRight;
return cloned;
};
cc.js.set(prototype, '_textureFilenameSetter', function (url) {
this._textureFilename = url;
if (url) {