title: How to create an eraser in EaselJS?
body: <p>I am developing a canvas paint but I want to have an eraser there. So I use this lines to erase de content but when I click is clear the whole canvas.</p>
  
  <pre><code>        //undo tool
          var undo = new createjs.Bitmap(app.loader.getResult('undo'));
          undo.name = 'undo';
          undo.x = brush.x + 90;
          undo.y = brush.y;
          undo.addEventListener('click', this.undoHandler); 
          this.toolsContainer.addChild(undo); 
  
          //trash tool
          var clear = new createjs.Bitmap(app.loader.getResult('clear'));
          clear.name = 'clear';
          clear.x = undo.x + 90;
          clear.y = undo.y;
          clear.addEventListener('click', this.clearHandler); 
          this.toolsContainer.addChild(clear);
  
          undoHandler:function(){
  
          if(tools.undoArray.length){
              var lastItem = tools.undoArray.pop();
              app.container.removeChild(lastItem);        
  
              var lastItem2 = tools.undoArray2.pop();
              app.container.removeChild(lastItem2);
  
              var lastItem3 = tools.undoArray3.pop();
              app.container.removeChild(lastItem3);
  
              app.stage.update();
          }
  
      }, 
  
      clearHandler:function(){
          app.container.removeAllChildren();
          app.container.updateCache(clearhandler?"destination-out":"source-over");;
          app.stage.update();
      },
  </code></pre>
  
  <p>I trying to develop something like this erase </p>
  
  <pre><code>http://jsfiddle.net/lannymcnie/ZNYPD/
  </code></pre>
  
  <p>any idea?</p>