Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easel.js stage.clear() not working

Pretty simple concept but it doesn't seem to be working. Here is my code:

stage.clear();
stage.update();

Simple stuff -- nothing happens. The docs aren't helping.

like image 881
skandocious Avatar asked Oct 24 '12 19:10

skandocious


2 Answers

This ended up working for me:

stage.removeAllChildren();
stage.update();
like image 128
skandocious Avatar answered Oct 23 '22 13:10

skandocious


if you have just one child of shape on that stage and dont want use removeallchildren, you can do this:

myshape.graphics.clear();
stage.update();

if more than one, then loop its children.

like image 2
axumnemonic Avatar answered Oct 23 '22 11:10

axumnemonic