[LayaAirIDE 2.0]Image设置skin的Bug
加载资源较多的情况,直接设置Image设置skin方式加载资源,然后快速关闭界面,Image被
destroy(destroyChild: boolean = true): void {
super.destroy(true);
this._bitmap && this._bitmap.destroy();
this._bitmap = null;
}
2,当前资源加载完成后,回调设置皮肤资源找不到_bitmap
/**
* @private
* 设置皮肤资源。
*/
protected setSource(url: string, img: any = null): void {
if (url === this._skin && img) {
this.source = img
this.onCompResize();
}
}
/**
* @inheritDoc
* @override
*/
/*override*/ protected measureWidth(): number {
return this._bitmap.width;
}
destroy(destroyChild: boolean = true): void {
super.destroy(true);
this._bitmap && this._bitmap.destroy();
this._bitmap = null;
}
2,当前资源加载完成后,回调设置皮肤资源找不到_bitmap
/**
* @private
* 设置皮肤资源。
*/
protected setSource(url: string, img: any = null): void {
if (url === this._skin && img) {
this.source = img
this.onCompResize();
}
}
/**
* @inheritDoc
* @override
*/
/*override*/ protected measureWidth(): number {
return this._bitmap.width;
}
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Aar0n
赞同来自: