title: how do i get the coordinates of a shape in fabric js?
body: <p>I tried the following code snippet but I am getting undefined in alert where I am accessing as thisCoords.t1 , can any one please guide me?</p>
  
  <pre><code>&lt;!--fabric js function to get coordinates of active object--&gt;
      function getCoords(oCoords) {
          return {
            tl: new fabric.Point(oCoords.tl.x, oCoords.tl.y),
            tr: new fabric.Point(oCoords.tr.x, oCoords.tr.y),
            bl: new fabric.Point(oCoords.bl.x, oCoords.bl.y),
            br: new fabric.Point(oCoords.br.x, oCoords.br.y)
          }
        }
  
  &lt;!--fabric js mouse move event--&gt;
      canvas.on('mouse:move', function(e){
      console.log('over1',e.target)
      if(e.target &amp;&amp; e.target !== canvas.getActiveObject())
       canvas.setActiveObject(e.target)
       var thisCoords = getCoords(canvas.getActiveObject().oCoords);
       alert("coords :"+thisCoords.t1);
      });
  </code></pre>