I'm trying to read the X coordinate of a mouse click on Fabric.js.
Here is my code. The console logs undefined
every time.
var canvas = new fabric.Canvas('c1');
canvas.on('mouse:down', function(e){
getMouse(e);
});
function getMouse(e) {
console.log(e.clientX);
}