Readonly
canvasPosition of the pointer relative to the top left corner of the drawing surface.
Readonly
deviceReadonly
downReadonly
idUnique ID for the pointer
Readonly
isReadonly
pressureReadonly
screenThe (x, y) position of the pointer relative to the top-left corner of the visible canvas.
Readonly
timeNumeric timestamp (milliseconds, as from performance.now()
).
Static
ofCreate a new Pointer from a point on the canvas. Intended for unit tests.
Static
ofCreates a Pointer from a DOM event. If relativeTo
is given, (0, 0) in screen coordinates is
considered the top left of relativeTo
.
Optional
relativeTo: HTMLElementStatic
ofCreate a new Pointer from a point on the screen. Intended for unit tests.
Provides a snapshot containing information about a pointer. A Pointer object is immutable — it will not be updated when the pointer's information changes.