我使用带有屏幕的标签画布1:1。我在画布上单击1点时尝试获取位置x,y:
var bRect = theCanvas.getBoundingClientRect();
var mouseX = (evt.clientX - bRect.left)*(theCanvas.width/bRect.width);
var mouseY = (evt.clientY - bRect.top)*(theCanvas.height/bRect.height);
它适用于iOS,Chrome浏览器,IE浏览器,但是对于Android来说,它在Chrome中是如此错误。如何在所有浏览器中修复它?