What is the simplest way to detect relative coordinates of mouse clicked position in image.

So if clicked in the top left corner of image, coordinates should be 0,0.

Found it!

` image.getElement().addEventListener(“click”, this::handleClick)
.addEventData(“event.offsetX”)
.addEventData(“event.offsetY”);
private void handleClick(DomEvent event) {
JsonObject eventData = event.getEventData();
double x = eventData.getNumber(“event.offsetX”);
double y = eventData.getNumber(“event.offsetY”);

    String text = "X: " + x + ", Y: " + y;
    System.out.println(text);
}

`