[LayaAir 2.0]AnimationBase和MovieClip removeLabel问题反馈
laya.core.js---AnimationBase
下面加粗代码用于补充删除空值对应的键
/**
*删除指定的帧标签。
*@param label 帧标签名称。注意:如果为空,则删除所有帧标签!
*/
__proto.removeLabel=function(label){
if (!label)this._labels=null;
else if (this._labels){
for (var name in this._labels){
this._removeLabelFromList(this._labels[name],label);
if(this._labels[name].length == 0){
delete this._labels[name];
}
}
}
}
-----------------------------------------------------------------------------------------------------------------------------------------
laya.ani.js---MovieClip
下面加粗部分,源码this._labels前面多了“!”,逻辑有误
/**
*删除某个标签
*@param label 标签名字,如果label为空,则删除所有Label
*/
__proto.removeLabel=function(label){
if (!label)this._labels=null;
else if (this._labels){
for (var name in this._labels){
if (this._labels[name]===label){
delete this._labels[name];
break ;
}
}
}
}
下面加粗代码用于补充删除空值对应的键
/**
*删除指定的帧标签。
*@param label 帧标签名称。注意:如果为空,则删除所有帧标签!
*/
__proto.removeLabel=function(label){
if (!label)this._labels=null;
else if (this._labels){
for (var name in this._labels){
this._removeLabelFromList(this._labels[name],label);
if(this._labels[name].length == 0){
delete this._labels[name];
}
}
}
}
-----------------------------------------------------------------------------------------------------------------------------------------
laya.ani.js---MovieClip
下面加粗部分,源码this._labels前面多了“!”,逻辑有误
/**
*删除某个标签
*@param label 标签名字,如果label为空,则删除所有Label
*/
__proto.removeLabel=function(label){
if (!label)this._labels=null;
else if (this._labels){
for (var name in this._labels){
if (this._labels[name]===label){
delete this._labels[name];
break ;
}
}
}
}
没有找到相关结果
已邀请:
1 个回复
Aar0n
赞同来自: