Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kinetic.Global.Stages/Shapes #79

Closed
tianxu0836 opened this issue Aug 27, 2012 · 4 comments
Closed

Kinetic.Global.Stages/Shapes #79

tianxu0836 opened this issue Aug 27, 2012 · 4 comments

Comments

@tianxu0836
Copy link

I'm not quite sure about this.
On my web page, if I add 100 canvas and I draw shapes on each of them. Later if I don't need those stages anymore and want to add another 100 stages, Kinetic.Global.Stages/Shapes will have a lots of stuff in it.
Can I manually set them to empty before I add new stages?
Something like Kinetic.Global.Stages = [ ]; Kinetic.Global.Stages = { } ?

@ericdrowell
Copy link
Owner

you read my mind. I don't particularly like how multiple stages are currently handled either, and haven't put too much thought into it since as of yet it's been lower on my priority list. Now that Kinetic is looking pretty solid, I'd like to relook into this.

What if you could manage your stages like this:

Kinetic.remove(stage);

@ericdrowell
Copy link
Owner

added it to the top of my todo list here:

https://github.com/ericdrowell/KineticJS/wiki/Todo-List

Cheers!

@tianxu0836
Copy link
Author

Sounds good!

@ericdrowell
Copy link
Owner

This should be working as of v4.3.1 via the destroy() method which should work with stages

stage.destroy();

If you still run into issues, please reopen this ticket :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants