Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js touch relative pos

x = e.touches[0].pageX - e.target.getBoundingClientRect().left
y = e.touches[0].pageY - e.target.getBoundingClientRect().top
 
PREVIOUS NEXT
Tagged: #js #touch #relative #pos
ADD COMMENT
Topic
Name
9+8 =