EN
Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

initPointerEvent method

Used to create an PointerEvent from JavaScript.

Internet Explorer 10

 

Syntax

PointerEvent.initPointerEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg, offsetXArg, offsetYArg, widthArg, heightArg, pressure, rotation, tiltX, tiltY, pointerIdArg, pointerType, hwTimestampArg, isPrimary);

Parameters

typeArg [in]

Type: DOMString

The type of the event being created

canBubbleArg [in]

Type: boolean

Indicates whether the event can bubble. When true the event should propagate upward. When false the event does not propagate upward.

cancelableArg [in]

Type: boolean

Indicates whether the event’s default action can be prevented. When true, the default action can be canceled. When false, the default action cannot be canceled.

viewArg [in]

Type: AbstractView

The view in which the event is taking place.

detailArg [in]

Type: Integer

Specifies some detailed information depending upon the event.

screenXArg [in]

Type: Integer

The x-coordinate of the event in screen coordinates relative to the upper left corner of the screen.

screenYArg [in]

Type: Integer

The y-coordinate of the event in screen coordinates relative to the upper left corner of the screen.

clientXArg [in]

Type: Floating-point

The x-coordinate of the event in client coordinates relative to the upper-left corner of the document's client area.

clientYArg [in]

Type: Floating-point

The y-coordinate of the event in client coordinates relative to the upper-left corner of the document's client area.

ctrlKeyArg [in]

Type: boolean

Indicates the state of the Ctrl key. When true, the left or right Ctrl key is pressed. If false, neither Ctrl key is pressed.

altKeyArg [in]

Type: boolean

Indicates the state of the Alt key. When true, the left or right Alt key is pressed. If false, neither Alt key is pressed.

shiftKeyArg [in]

Type: boolean

Indicates the state of the Shift key. When true, the left or right Shift key is pressed. If false, neither Shift key is pressed.

metaKeyArg [in]

Type: boolean

Indicates the state of the Meta/Command key. If true, the left or right Meta/Command key is pressed. If false neither Meta/Command key is pressed.

buttonArg [in]

Type: Number

If the event is caused by a mouse event, this indicates the mouse button that caused the event.

relatedTargetArg [in]

Type: EventTarget

A reference to the related element.

offsetXArg [in]

Type: Floating-point

The x-coordinate of the event in the element.

offsetYArg [in]

Type: Floating-point

The y-coordinate of the event in the element.

widthArg [in]

Type: Integer

The contact width of the pointer point specified by pointerId.

heightArg [in]

Type: Integer

The contact height of the pointer point specified by pointerId.

pressure [in]

Type: Floating-point

Pen pressure normalized in a range of 0 to 255.

rotation [in]

Type: Integer

Clockwise rotation of the cursor around its own major axis. Range: 0 to 359.

tiltX [in]

Type: Integer

The plane angle between the Y-Z plane and the plane containing the transducer axis and the Y axis. A positive X Tilt is to the right. This quantity is used in conjunction with Y Tilt to represent the tilt away from normal of a transducer, such as a stylus. Range: -90 to +90.

tiltY [in]

Type: Integer

Represents the angle between the X-Z and transducer-X planes. A positive Y Tilt is toward the user. Range: -90 to +90.

pointerIdArg [in]

Type: Integer

Specifies the unique ID of the contact.

pointerType [in]

Type: Integer

Indicates whether the source is touch, pen or mouse.

hwTimestampArg [in]

Type: Integer

Used to specify the time at which the event was created in microseconds.

isPrimary [in]

Type: boolean

Indicates whether this is the primary pointer that is used to control the mouse position in a multi-touch scenario.

Return value

This method does not return a value.

Remarks

Note  This item described in this topic requires Windows 8.

See also

PointerEvent

 

 

Mostra:
© 2014 Microsoft