Reputation: 13
I have created a kinetic.js layer and added some images on it. Now i want to remove all the images and redraw the layer by adding some new images(like a second level images for a game). I have tried using the layer.remove(image) function.
But after the redraw the old images are still shown whereas the new images are not added.
Could anyone help me to solve this issue..?
Upvotes: 0
Views: 2463
Reputation: 6533
I use
layer.removeChildren();
layer.draw();
layer.add(newRectWhatever);
and that works for me.
Upvotes: 2