I'm trying to create an script draw something in an element by mouse and I'm using Raphaeljs
to do that.
For correct drawing I need to find top
and left
of ?input??
element. I'm using var offset = $("#input").offset();
to get left
and top
.
But the top
value isn't correct. It's 10px
lower than ??the real top
distance. I think the 10px
maybe change in different resolutions then I can't add 10px
to it normally then I want to know how can I fix the problem!
I uploaded my test here.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…