C

PointerEventArgs

Complex event arguments that are used by the CanvasComponent to indicate pointer events in world coordinates.
Inheritance Hierarchy

Members

No filters for this type

Constructors

Constructs a new pointer event argument.

Parameters

eventType?: PointerEventType
The type of the event
location?: Point
The position of the pointer in world coordinates at the time of the event. If omitted, ORIGIN will be the location.
changedButtons?: PointerButtons
The pointer buttons that have changed state if the type of event is DOWN or UP
changedModifiers?: ModifierKeys
The modifier Keys that have been changed
buttons?: PointerButtons
The current state of the PointerButtons
modifiers?: ModifierKeys
The current state of the modifier Keys
clickCount?: number
The number of clicks this event represents, 2 for a double click
pointerType?: PointerType
The device type which caused this event
isPrimary?: boolean
If this pointer represents the primary pointer of this type
pointerId?: number
The identifier of the pointer which caused this event
pointerSize?: Size
The width and height of the pointer's contact area. If omitted, the pointer has an EMPTY size.
pressure?: number
The normalized pressure of the pointer
originalEvent?: UIEvent
The native platform event args
wheelDeltaX?: number
The optional number of mouse wheel turn units in horizontal direction
wheelDeltaY?: number
The number of mouse wheel turn units in vertical (default) direction

Properties

Gets a value indicating whether the alt modifier is pressed.
readonlyfinal

Property Value

true if the alt modifier is pressed; otherwise, false.
Gets the state of the device buttons at the time of the event creation.
readonlyfinal
Gets the mouse buttons that have changed for this event.
readonlyfinal

See Also

API
buttons
Gets the modifier keys that have changed for this event.
readonlyfinal

See Also

API
modifiers
Gets the number of clicks the current event represents if it is of type CLICK.
readonlyfinal
Gets a value indicating whether the control modifier is pressed.
readonlyfinal

Property Value

true if the control modifier is pressed; otherwise, false.
Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
readonlyfinal

Property Value

true if preventDefault had been called; otherwise, false.
Gets the type of this event.
readonlyfinal
Indicates if the pointer represents the primary pointer of this type.

Pointers of type MOUSE will always be primary, since a mouse can only have one pointer. In case of type TOUCH or PEN, a pointer is considered primary if the touch or stylus contact occurred when there were no other active pointers of the same type.

When two or more different pointer device types are being used concurrently, each type will have a primary pointer. For example, a mouse cursor and a touch contact moved simultaneously will result in both pointers being considered as primary.

readonlyfinal
Gets the coordinates in the world coordinate space associated with this event.
readonlyfinal
Gets a value indicating whether the meta modifier is pressed.
readonlyfinal

Property Value

true if the meta modifier is pressed; otherwise, false.
Gets the state of the modifier keys at the time of the event creation.
readonlyfinal
Gets the original DOM event associated with this event.
It is possible that the PointerEventArgs are not created based on a native event, in this case this will be null.
readonlyfinal
The identifier assigned to the pointer causing the pointer event.

The id is unique for each active pointer device with the same type.

The actual value of the pointer id may be randomly generated, thus it is not guaranteed to convey any particular meaning.

readonlyfinal
The width and the height of the pointer's contact area.
The input hardware defines the coordinate space. If the hardware cannot report the contact area, the size defaults to 1 for its width and height.
readonlyfinal
Gets the device type that caused the pointer event.
readonlyfinal
The normalized pressure of the pointer input in the range of 0 to 1.
If the hardware does not support pressure, the value is 0 if the pointer's active buttons state is NONE and 0.5 otherwise.
readonlyfinal
Gets a value indicating whether the shift modifier is pressed.
readonlyfinal

Property Value

true if the shift modifier is pressed; otherwise, false.
Gets the signed number of mouse wheel turn units in horizontal direction.
Note that this can, for high-precision mouse wheels, include fractional turns. Most mouse devices do not support horizontal mouse wheel scrolling, but some high precision touch pads use this for "panning" the mouse horizontally.
Note that this value can be different from the deltaX value of the originalEvent due to cross system normalization.
readonlyfinal

See Also

API
wheelDeltaY
Gets the signed number of vertical mouse wheel turn units.
This is the default (vertical) turn direction, as mouse wheels typically scroll vertically. Note that this can, for high-precision mouse wheels, include fractional turns.
Note that this value can be different from the deltaY value of the originalEvent due to cross system normalization.
readonlyfinal

See Also

API
wheelDeltaX

Methods

Sets this event's defaultPrevented property to true signaling that the event has been properly handled and any default behaviors should be prevented.
This will call the corresponding method on the original native event.
final

See Also

API
defaultPrevented
Returns a string representation for this object.
final

Return Value

string
a string describing this object