title: fabricjs: how to show object size after scaling
body: <p>I am using wordpress plugin called "Woocommerce Product Designer" which includes a JavaScript library called fabicjs in version 1.4.9.</p>
  
  <p>I need a way to show the width and height of an object in fabric after (or while) I re-scale them.   </p>
  
  <p>I made some adjustments directly in file fabric-all.min.js:  </p>
  
  <pre><code>_beforeTransform: function (e, t) {
      var myHeight = Math.floor(t.currentHeight);
      var myWidth = Math.floor(t.currentWidth);
      if(!jQuery("#size").length){
          jQuery('&lt;p id="size"&gt;&lt;/p&gt;').insertBefore(".upper-canvas");
      }
      else{
          jQuery("#size").html("&lt;span&gt;size: &lt;/span&gt;"+myWidth +" x "+myHeight +" cm"+"&lt;br&gt;");
      }                                                  
      var n;
      this.stateful &amp;&amp; t.saveState(), (n = t._findTargetCorner(this.getPointer(e))) &amp;&amp; this.onBeforeScaleRotate(t), t !== this.getActiveGroup() &amp;&amp; t !== this.getActiveObject() &amp;&amp; (this.deactivateAll(),     this.setActiveObject(t, e))
  },
  </code></pre>
  
  <p>It works but it shows values from previous transform right before current transform starts. In this way I need another action (for example simple click on object) to update to current values.  </p>
  
  <p>So I need either call some function which simulate click on object to update values or move my code to a different function which is called during (or after) transform and which has access to information about current object size.</p>