MSPointerEvent object

0 out of 1 rated this helpful - Rate this topic

Provides contextual information associated with touch, pen or mouse events.

DOM Information

Inheritance Hierarchy

 Event
  UIEvent
   MouseEvent
     MSPointerEvent

Members

The MSPointerEvent object has these types of members:

Events

The MSPointerEvent object has these events.

EventDescription
MSPointerCancel

Fires when the system cancels a pointer event.

MSPointerDown

Event that is triggered when a contact touches the screen on element.

MSPointerHover

Event that is triggered when a contact (normally a pen) moves over an element without touching the surface.

MSPointerMove

Event that is triggered when a contact moves on the screen while over an element.

MSPointerOut

This event is triggered when a pointer moves from inside to outside the boundaries of this element. This event is always raised, whether or not the pointer is captured to this element.

MSPointerOver

Event that is triggered when a contact moves from outside to inside the bounds of this element. This event is always raised, whether or not the pointer is captured to this element.

MSPointerUp

Event that is triggered when a contact is raised off of the screen over an element.

 

Methods

The MSPointerEvent object has these methods.

MethodDescription
getCurrentPoint

Retrieves a PointerPoint object that provides basic info on the pointer associated with the event.

getIntermediatePoints

Retrieves a collection of PointerPoint objects that represent the pointer history from the last pointer event up to and including the current pointer event. Each PointerPoint in the collection provides basic info on the pointer associated with the event.

initPointerEvent

Used to create an MSPointerEvent from JavaScript.

msReleasePointerCapture

Releases a pointer captured by an element.

msSetPointerCapture

Assigns the current pointer (touch, pen, or mouse) and MSPointerEvents to a specific element.

 

Properties

The MSPointerEvent object has these properties.

PropertyDescription

currentPoint

Gets a PointerPoint object that provides basic info on the pointer associated with the event.

hwTimestamp

Returns the time at which the pointer data was reported by the hardware, in microseconds.

intermediatePoints

Retrieves a collection of PointerPoint objects that represent the pointer history from the last pointer event up to and including the current pointer event. Each PointerPoint in the collection provides basic info on the pointer associated with the event.

isPrimary

Returns whether the pointer associated with the event is the primary pointer for the current mouse, touch, or pen interaction.

pointerId

The unique identifier of the contact for a touch, mouse or pen.

pointerType

Returns whether the source of the event is touch, pen or mouse.

pressure

Returns pen pressure normalized in a range of 0 to 255.

tiltX

Returns the angle between the Y-Z plane and the plane containing the pen axis and the Y axis in the range of -90 to +90. A positive X tilt is to the right.

tiltY

Returns the angle between the X-Z and transducer-X planes. A positive Y tilt is toward the user.

timeStamp

Gets the time, in milliseconds, when an event occurred.

 

Remarks

Unlike mouse events, pointer events are fired by touch, pen, or mouse contact.

Note  For more information about controlling touch behavior and using multi-touch, see Guidelines for Building Touch-friendly Sites.

See also

DOM pointer and gesture event handling sample
msTouchAction
MouseEvent

 

 

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.