Function getRelativeEventPosition

  • Returns {x,y} of the event relative to the event target

    Parameters

    • event: TouchEvent | MouseEvent
    • Optional target: HTMLElement

    Returns {
        x: number;
        y: number;
    }

    • x: number
    • y: number