title: Fabric JS group selection and scaling messing up individual object position attributes
body: <p>I am trying to achieve a function so that every object on the canvas scales down in size equally and center them on the canvas (in order to add some space / padding around the canvas)</p>
  <p>However as soon as I define the <code>selection</code> variable, the position of the object completely changes, without changing position visually. Most <code>top</code> and <code>left</code> attributes become negative, I found out that their new position represent their distance from the <strong>center</strong> of the group of objects.</p>
  <p>This causes persistent effects on the canvas, when I call <code>selection.addWithUpdate()</code> the bounding box appears in the same place, but the object controls (resize and rotation dots) are still on the incorrect position. I tried using <code>selection.setCoords()</code> to reset the controls, but it had no effect.</p>
  <p>When I loop through every object and <code>console.log</code> the <code>obj.left</code> and <code>obj.top</code> I get the mostly negative values, as previously mentioned, i.e. the position of the object controls.</p>
  <pre><code>var selection = new fabric.ActiveSelection(canvas.getObjects(), { canvas: canvas });
  selection.scaleToHeight(0.8)
  selection.center();
  
  canvas.renderAll()
  selection.addWithUpdate()
  selection.setCoords()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/6nV5r.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6nV5r.jpg" alt="enter image description here" /></a></p>