You need to transform screen coordinates when using them in a SVG

Use CTM transform

Try to move mouse over SVG drawing