# Interface GestureEvent

手势事件，涵盖触摸、鼠标、笔等输入方式

interface GestureEvent {
center: GesturePointer;
defaultPrevented: boolean;
isFinal: boolean;
isFirst: boolean;
overallVelocityX: number;
overallVelocityY: number;
pointers: GesturePointer[];
pointerType: "touch" | "pen" | "mouse" | "kinect";
scale: number;
srcEvent: MouseEvent | TouchEvent | PointerEvent;
state: State;
target: EventTarget | null;
timeStamp: number;
type: string;
userAction: boolean;
velocityX: number;
velocityY: number;
preventDefault(): void;
}

#### Hierarchy (View Summary)

- StateEvent
  - GestureEvent

- Defined in lib/five/utils/event.ts:109

##### Index

### Properties

center
defaultPrevented
isFinal
isFirst
overallVelocityX
overallVelocityY
pointers
pointerType
scale
srcEvent
state
target
timeStamp
type
userAction
velocityX
velocityY

### Methods

preventDefault

## Properties

### center

center: GesturePointer

所有活跃指针的中心点信息

- Defined in lib/five/utils/event.ts:125

### `Readonly` defaultPrevented

defaultPrevented: boolean

是否已调用过 preventDefault

Inherited from StateEvent.defaultPrevented

- Defined in lib/five/utils/event.ts:23

### isFinal

isFinal: boolean

是否为该手势序列的最后一个事件

- Defined in lib/five/utils/event.ts:121

### isFirst

isFirst: boolean

是否为该手势序列的第一个事件

- Defined in lib/five/utils/event.ts:119

### overallVelocityX

overallVelocityX: number

整个手势序列的 x 方向平均速度

- Defined in lib/five/utils/event.ts:131

### overallVelocityY

overallVelocityY: number

整个手势序列的 y 方向平均速度

- Defined in lib/five/utils/event.ts:133

### pointers

pointers: GesturePointer[]

所有活跃指针的信息列表

- Defined in lib/five/utils/event.ts:117

### pointerType

pointerType: "touch" | "pen" | "mouse" | "kinect"

输入设备类型

- Defined in lib/five/utils/event.ts:113

### scale

scale: number

多指缩放比例

- Defined in lib/five/utils/event.ts:123

### srcEvent

srcEvent: MouseEvent | TouchEvent | PointerEvent

原始 DOM 事件

- Defined in lib/five/utils/event.ts:115

### state

state: State

当前的 Five 状态

Inherited from StateEvent.state

- Defined in lib/five/utils/event.ts:43

### target

target: EventTarget | null

事件的原始 DOM 目标

- Defined in lib/five/utils/event.ts:111

### timeStamp

timeStamp: number

事件触发时的时间戳

Inherited from StateEvent.timeStamp

- Defined in lib/five/utils/event.ts:19

### type

type: string

事件类型名称

Inherited from StateEvent.type

- Defined in lib/five/utils/event.ts:17

### userAction

userAction: boolean

是否由用户交互触发

Inherited from StateEvent.userAction

- Defined in lib/five/utils/event.ts:45

### velocityX

velocityX: number

当前 x 方向速度

- Defined in lib/five/utils/event.ts:127

### velocityY

velocityY: number

当前 y 方向速度

- Defined in lib/five/utils/event.ts:129

## Methods

### preventDefault

- preventDefault(): void

  阻止事件的默认行为

  #### Returns void

  Inherited from StateEvent.preventDefault

  - Defined in lib/five/utils/event.ts:21