title: Limit resize in Fabric.js
body: <p>I'm trying to limit max object resize in Fabric.js. I'm using <code>observe("object:scaling")</code> with this code:</p>
  
  <pre><code>canvasLI.observe("object:scaling", function(e) {
  var shape = e.target;
  var scaleX = shape.scaleX;
  var scaleY = shape.scaleY;
  var posX = shape.left;
  var posY = shape.top;
  
  if(!isNaN(scaleX) &amp;&amp; scaleX &gt; 2)
      {
      shape.set({
          scaleX: 2,          
          });
      }
  if(!isNaN(scaleY) &amp;&amp; scaleY &gt; 2)
      {
      shape.set({
          scaleY: 2,
          });
      }
  shape.set({
      left: posX,
      top: posY,
      });
  console.log("X:" + ( shape.scaleX) + " Y:" + (shape.scaleY));
  });
  </code></pre>
  
  <p>It works fine, and limit max size in scale, <b>but when one object has scale limit</b> and try to resize again, <b>it moves following the mouse cursor</b> on top and bottom-left controls (not in bottom-right control). </p>
  
  <p>Also, I tried to capture <code>left</code> and <code>top</code> values in the object to move it to these values, but doesn't work.</p>
  
  <p>Thanks.</p>
  
  <p>PS: Also tried to change <code>shape.width</code> and <code>shape.height</code> instead of scaleX and scaleY and the problem is the same.</p>
  
  <p>EDIT: </p>
  
  <p>I have been could stop the movement of the object on scaling adding <code>lockScalingX:true and lockScalingY:true</code> to the code on max-scale, but now I have another problem. How I can disable this lockScaling putting this value to false when I scale DOWN? How I can get the event of scale DOWN?</p>