CoordinateSystemClient: "client"

Type definition for selector of 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 }

By using translateCoordinate method, client coordinates can be translated to other coordinate systems and vice versa. For example, in order to:

  • Position LCJS UI elements in client coordinates
  • Find client coordinate that matches a location along LCJS Axis or Chart.
  • etc.

Users should not need to reference this type directly. Instead, the convenience selector coordsClient should be used.