I'm trying to create a simple path object using Farbic.js. When the path is added to canvas, it does not appear to be positioned correctly. Here is my code:
HTML
<canvas id="c" height="300" width="300"></canvas>
JS
var canvas = new fabric.Canvas('c');
canvas.backgroundColor = '#f5f5f5';
var line = new fabric.Path('M 0 0 L 100 100',{
stroke: 'black',
fill: ''
});
canvas.add(line);
According to the data I'm passing in, the path should start at point 0,0 and draw a line to point 100, 100. However, my line is actually being placed at point 50,50, as you can see by the alert.
Why isn't the path starting at point 0,0?
Here's a fiddle: http://jsfiddle.net/flyingL123/h14th5pf/3/