问题
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.
回答1:
This ended up working for me:
stage.removeAllChildren();
stage.update();
回答2:
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.
来源:https://stackoverflow.com/questions/13056076/easel-js-stage-clear-not-working