I’m doing a where’s wally project in react. I need to check if the point that the user clicks on a image is in a specific part of the image (i thought a rectangular part would be easy)
I took the point the user clicked and made them to be same on smaller devices by dividing them by the resized image sizes ie.
the user clicked on (100,50) and the image is 500×400 so the general points are (100% of 500,50% of 400) I cannot think of any other way to generalize the coordinates so there may be better approach
I’m getting the coordinates by using a <input type=image/>
but how do i check if the points lie in the specific region of image?