I have create a shape object(like konva.Rect
) and want to reuse it in some cases.
In the first place, add it to layer, and everything is fine, like drag, move .etc. And then destroy
it from layer by some trigger event, and at some point in time, add it back to layer with layer.add(rectObj)
, the shape lost some
properties like drag, but use remove
will not.
I check the source code, but have no clue about this situation. The only difference is that delete id
and name
in destroy()
,
It's seems too vague in documents.
destroy() remove and destroy self
remove() remove self from parent, but don't destroy
So want to know if use remove
and shape object id
and name
will remain in layer, Is there any significant impact about the render or others?
If use destroy
, how to make it works like first add to layer?