Skip to content

System.Context.currentEvent.offsetX

Description

Obtain the horizontal offset of the event target relative to the element that triggers the event.

Grammar

System.Context.currentEvent.offsetX

Code Example

Obtain the horizontal offset of the current triggering event.

const offsetX = System.Context.currentEvent.offsetX;
console.log(offsetX)