Deleting shapes
There are two very close methods remove()
and destroy()
. If you need to completely delete a node you should destroy()
it. The destroy()
method deletes all references to node from the KonvaJS engine. If you are going to reuse a node you should remove()
it then later you can add it again to any container.
Tweening
When you are using Konva.Tween
instance you have to destroy it after usage.
var tween = new Konva.Tween({ |
Or if you don’t need to reuse the tween you can use the new to()
method:
// the tween will be automatically started and destroyed on finish |
Enjoying Konva? Please consider to
support the project.