Be the first user to complete this post

  • 0
Add to List

Event coordinates and element dimentions on a page

Often times you will find yourself in a situation where you need to get the width and height of an element or the coordinates of a mouse click or mouse move. Therefore, I created a very simple illustration to help you easily determine what property you need to get for your needs.

Event coordinates

Diagram showing the properties relative to the mouse event. event coordinates

Element coordinates

Diagram showing the properties of a element with respect to its parent. The one with the green outline is the parent and the one with the red outline is the child. In this case, the child is larger than the parent and overflows out of it in both x and y directions. There are several more but most of the time, the ones you see here will be sufficient. element dimentions



Also Read:

  1. Need to know the difference between CNAME and an A Record to deploy your REST API? We got you covered.
  2. Getting started with automation testing for webrtc applications
  3. Setup nginx with multi domain websites running on nodejs