Complex event arguments that are used by the CanvasComponent to indicate pointer events in world coordinates.
Type Details
- yFiles module
- view
Constructors
PointerEventArgs
(eventType?: PointerEventType, location?: Point, changedButtons?: PointerButtons, changedModifiers?: ModifierKeys, buttons?: PointerButtons, modifiers?: ModifierKeys, clickCount?: number, pointerType?: PointerType, isPrimary?: boolean, pointerId?: number, pointerSize?: Size, pressure?: number, originalEvent?: UIEvent, wheelDeltaX?: number, wheelDeltaY?: number)Constructs a new pointer event argument.
Parameters
A map of options to pass to the method.
- 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
- 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 the state of the device buttons at the time of the event creation.
Gets the mouse buttons that have changed for this event.
See Also
Gets the modifier keys that have changed for this event.
See Also
Gets the number of clicks the current event represents if it is of type CLICK.
Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
Property Value
Gets the type of this event.
Indicates if the pointer represents the primary pointer of this type.
Remarks
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.
Gets the coordinates in the world coordinate space associated with this event.
Gets the state of the modifier keys at the time of the event creation.
Gets the original DOM event associated with this event.
Remarks
The identifier assigned to the pointer causing the pointer event.
Remarks
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.
The width and the height of the pointer's contact area.
Remarks
Gets the device type that caused the pointer event.
The normalized pressure of the pointer input in the range of 0 to 1.
Remarks
Gets the signed number of mouse wheel turn units in horizontal direction.
Remarks
See Also
deltaX
value of the originalEvent due to cross system normalization.Gets the signed number of vertical mouse wheel turn units.
Remarks
See Also
deltaY
value of the originalEvent due to cross system normalization.Methods
Sets this event's defaultPrevented property to true
signaling that the event has been properly handled and any default behaviors should be prevented.