title: Image zoom centered on mouse position
body: <p>I am writing a script with Fabric.js to zoom an image at the current mouse position. I have made some progress but there is an error somewhere.</p>
  
  <p><strong>Case 1</strong>: Keep the mouse at one point and zoom with the mouse wheel.</p>
  
  <p>Result: Works perfectly, image zooms at that particular pixel.</p>
  
  <p><strong>Case 2:</strong> Zoom in a little at one position (3-5 times with mouse wheel), then move the mouse to a new position and zoom in there.</p>
  
  <p>Result: Works fine for the first point, but after moving to another point and zooming, the image position is incorrect.</p>
  
  <p>My code is in this fiddle:</p>
  
  <p><a href="https://jsfiddle.net/gauravsoni/y3w0yx2m/1/" rel="noreferrer">https://jsfiddle.net/gauravsoni/y3w0yx2m/1/</a></p>
  
  <p>I suspect there is something wrong with the image positioning logic:</p>
  
  <pre><code>imgInstance.set({top:imgInstance.getTop()-newMousY,left:imgInstance.getLeft()-newMousX});
  </code></pre>
  
  <p>What is going wrong?</p>