Skip to content

@jtopo/core / StageEvent

Class: StageEvent<K>

事件基类

Type parameters

NameTypeDescription
Kextends keyof StageEventsMap事件映射类型,例如{zoom: {scale: number, afterScale: number, factor: number, cancelable?: boolean, x: number, y: number}}

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new StageEvent<K>(type, data?)

Type parameters

NameType
Kextends keyof StageEventsMap

Parameters

NameType
typeK
data?StageEventsMap[K]

Inherited from

JTopoEvent.constructor

Properties

cancelable

cancelable: boolean = false

Inherited from

JTopoEvent.cancelable


defaultPrevented

defaultPrevented: boolean = false

Inherited from

JTopoEvent.defaultPrevented


target

Optional target: any

Inherited from

JTopoEvent.target


type

type: K

Inherited from

JTopoEvent.type

Methods

preventDefault

preventDefault(): void

Returns

void

Inherited from

JTopoEvent.preventDefault