You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My HTML contains an image with an attached click-listener. I'd like to retrieve the mouse clicks position relative to the image like
var X = (e.pageX - this.offsetLeft); var Y = (e.pageY - this.offsetTop);
but the offset always returns 0. Is there a way to get the precise relative position of an entity in the document without substracting its precalculated position?
The text was updated successfully, but these errors were encountered:
My HTML contains an image with an attached click-listener. I'd like to retrieve the mouse clicks position relative to the image like
var X = (e.pageX - this.offsetLeft);
var Y = (e.pageY - this.offsetTop);
but the offset always returns 0. Is there a way to get the precise relative position of an entity in the document without substracting its precalculated position?
The text was updated successfully, but these errors were encountered: