forked from floraachy/ImageKnife
1.保证gif绘制在onReady之后,需要后续优化内容
Signed-off-by: zhoulisheng1 <zhoulisheng1@huawei.com>
This commit is contained in:
parent
dfb7059b1d
commit
791cf55158
|
@ -477,7 +477,10 @@ export struct ImageKnifeComponent {
|
||||||
console.log('default drawMainSource end!')
|
console.log('default drawMainSource end!')
|
||||||
})
|
})
|
||||||
} else if (data.isGIFFrame()) {
|
} else if (data.isGIFFrame()) {
|
||||||
|
// GIF的数据返回在canvas onReady 之前 导致第一帧绘制不出来
|
||||||
|
setTimeout(()=>{
|
||||||
this.drawGIFFrame(context, data, imageKnifeOption, compWidth, compHeight, setGifTimeId)
|
this.drawGIFFrame(context, data, imageKnifeOption, compWidth, compHeight, setGifTimeId)
|
||||||
|
},10)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue