In chrome canary, layerX and layerY are deprecated, but what should we use instead ?
I've find offsetX but it doesn't work with Firefox. So to get layerX without warning on webkit, I've done that :
var x = evt.offsetX || evt.layerX,
y = evt.offsetY || evt.layerY;
But this seem quite complex ! Is that really what we should do to get layerX working in all browsers ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…