title: Let user delete a selected fabric js object
body: <p>I have a simple fabric js based application where I will let users add shapes connect them and animate them.</p>
  
  <p>Following is my JS </p>
  
  <pre><code>var canvas; 
  window.newAnimation = function(){
     canvas = new fabric.Canvas('canvas');
  }
  
  window.addRect = function(){
      var rect = new fabric.Rect({
    left: 100,
    top: 100,
    fill: 'red',
    width: 20,
    height: 20,
  });
      canvas.add(rect);
  
  }
  
  window.addCircle = function(){
      var circle = new fabric.Circle({
    radius: 20, fill: 'green', left: 100, top: 100
  });
      canvas.add(circle);
  }
  </code></pre>
  
  <p>This is my <a href="http://jsfiddle.net/wwerpuj9/" rel="noreferrer">Fiddle</a>. You can click on new animation and then add objects as of now.</p>
  
  <p>I want the user to select some object and then also be able to delete it I am not sure how. I found this <a href="https://stackoverflow.com/questions/11829786/delete-multiple-objects-at-once-on-a-fabric-js-canvas-in-html5">Delete multiple Objects at once on a fabric.js canvas in html5</a> But i was not able to implement it successfully. I basically want users to be able to select an object and delete it.</p>