mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #1714 from jareguo/v1.5
fix clone SpriteFrame on native
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user