How Can I Display The Mouse Coordinates In Fabric.js
Hi I'm trying to display or capture the mouse coordinates in my program. In this program, you can click on any button and corresponding image will appear. I want to display the mou
Solution 1:
This could be your getMouse function:
function getMouse(options) {
p = canvas.getPointer(options.e);
document.getElementById('mouse').value = '' + p.x.toFixed() + ', ' + p.y.toFixed(0);
}
This is a unpdated working fiddle. http://jsfiddle.net/wv9MU/22/
Post a Comment for "How Can I Display The Mouse Coordinates In Fabric.js"