Using AnimatedGif.clone() should mark clones as dirty to trigger an update
greenpixels opened this issue · comments
Hey there,
I've noticed that cloning an AnimatedGIF and immediatly adding it to a container causes it to not be shown for a fraction of a second.
I've tried reproducing the behaviour on a StackBlitz:
https://stackblitz.com/edit/vitejs-vite-63qf4t?file=src%2Fmain.ts
I looked through the repository and if I am not mistaken it would be due to the fact that when we .clone()
the AnimatedGIF ...
dirty
is initially set to falseupdateFrameIndex
has not been called yet, therefore not settingdirty = true
- when
updateFrame
is called it won't execute since dirty is not set totrue
.