title: Drawing a vertical line in the center of the canvas with fabricjs?
body: <p>I'm trying to draw a line in the exact center of my canvas. Right now I'm using a kind of hacky method.</p>
  
  <pre><code>// Centered Line
  fabric.Image.fromURL('https://i.imgur.com/zM63v6J.png', function(myImg) {
    var img1 = myImg.set({
      left: 306,
      selectable: false,
    });
    canvas.add(img1);
  });
  </code></pre>
  
  <p>This gets the job done but I'm sure there's a lighter way to do this.</p>
  
  <p>Any help would be greatly appreciated. Thanks in advance</p>