I have a image like this
var image = new Kinetic.Image({
x : x,
y : y,
width : 1000,
height :100,
image : image,
});
How do I get the mouse position based on the image. according this example, I could get position Object{0, 0} ~ {100, 1000}
I only found an api stage.getPointerPosition()
If you want to get mouse position on
clickthen you can do this:Please find the working example below albeit it uses KonvaJS but the concept is same. And you should also start using Konva cause it's well maintained and documented.