Answer the question
In order to leave comments, you need to log in
What is the result array, more precisely, it is not clear how we got these coordinates?
What is the result array, more precisely, it is not clear how we got these coordinates?
Using JavaScript, find the coordinates of the corners indicated by the arrows relative to the browser window.
plnkr.co/edit/ryy56nfkFB7RDzw0TrBn?p=preview
Answer the question
In order to leave comments, you need to log in
fieldCoords.left + field.clientLeft = position from window left border + element border width ( e.g. border:4px solid red;, clientLeft = 4)
fieldCoords.left + field.clientLeft + field.clientWidth= position from window left border + border width element + element width
According to your link, the problem is described, and it is also solved. The text displayed by alert lists the coordinates of the four corners marked with arrows.
About the viewport is well described here https://www.quirksmode.org/mobile/viewports.html
(there is also the second part).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question