'Clicking in Canvas Angular

I am trying to capture the mouse click on a canvas that is resized (to draw an rectangle), my problem is that event.screenX /event.screenY always returns the same value...When I use clientX/clientY there is a space between the click and the drawing.. Any help? Thank you! :D



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source