title: How to trigger fabric.js "object:modified" event programmatically?
body: <p>I want to fire the 'object:modified' event programmatically. I already tried with "fire" and "trigger" methods.</p>
  
  <pre><code>var canvas = new fabric.Canvas('c');
  
  canvas.on("object:modified", function (e) {
      alert("object modified");
  });
  
  var text = new fabric.Text('Text', {
    fontFamily: 'Hoefler Text',
    left: 10,
    top: 10
  });
  
  canvas.add(text);
  
  $('.fillText').click(function(){
    text.setFill($(this).data('color'));
    canvas.renderAll();
  
    text.trigger('modified');
  });
  
  $('#moveText').click(function(){
    text.setLeft(50);
    text.setTop(50);
    text.setCoords();
    canvas.renderAll();
  
    text.trigger('modified');
  });
  </code></pre>
  
  <p><a href="https://jsfiddle.net/gb4u85q4/" rel="noreferrer">https://jsfiddle.net/gb4u85q4/</a></p>