CoordinateClient: {
    clientX: number;
    clientY: number;
}

Interface for a coordinate in HTML client coordinate system.

This references the coordinate system used in HTML. It starts at top left of the web page and is measured in pixels. For example, { x: 100, y: 20 } corresponds to 100 pixels from left and 20 pixels from top.

JavaScript events are tracked and HTML elements are positioned in the client coordinate system.

 // Example of a CoordinateClient
const coordinateClient = { clientX: 45, clientY: 10 }

Intended to be used with translateCoordinate.

Type declaration

  • clientX: number
  • clientY: number