Skip to content

Class: DragEvent โ€‹

Hierarchy โ€‹

Implements โ€‹

Table of contents โ€‹

Constructors โ€‹

Properties โ€‹

Accessors โ€‹

Methods โ€‹

Constructors โ€‹

constructor โ€‹

โ€ข new DragEvent(params): DragEvent

Parameters โ€‹

NameType
paramsIUIEvent

Returns โ€‹

DragEvent

Inherited from โ€‹

PointerEvent.constructor

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:31

Properties โ€‹

origin โ€‹

โ€ข Readonly origin: IObject

Implementation of โ€‹

IDragEvent.origin

Inherited from โ€‹

PointerEvent.origin

Defined in โ€‹

leafer/packages/event/src/Event.ts:7


type โ€‹

โ€ข Readonly type: string

Implementation of โ€‹

IDragEvent.type

Inherited from โ€‹

PointerEvent.type

Defined in โ€‹

leafer/packages/event/src/Event.ts:9


phase โ€‹

โ€ข Readonly phase: number

Implementation of โ€‹

IDragEvent.phase

Inherited from โ€‹

PointerEvent.phase

Defined in โ€‹

leafer/packages/event/src/Event.ts:14


isStopDefault โ€‹

โ€ข isStopDefault: boolean

Implementation of โ€‹

IDragEvent.isStopDefault

Inherited from โ€‹

PointerEvent.isStopDefault

Defined in โ€‹

leafer/packages/event/src/Event.ts:16


isStop โ€‹

โ€ข isStop: boolean

Implementation of โ€‹

IDragEvent.isStop

Inherited from โ€‹

PointerEvent.isStop

Defined in โ€‹

leafer/packages/event/src/Event.ts:17


isStopNow โ€‹

โ€ข isStopNow: boolean

Implementation of โ€‹

IDragEvent.isStopNow

Inherited from โ€‹

PointerEvent.isStopNow

Defined in โ€‹

leafer/packages/event/src/Event.ts:18


BEFORE_DRAG โ€‹

โ–ช Static BEFORE_DRAG: string = 'drag.before_drag'

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:12


START โ€‹

โ–ช Static START: string = 'drag.start'

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:14


DRAG โ€‹

โ–ช Static DRAG: string = 'drag'

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:15


END โ€‹

โ–ช Static END: string = 'drag.end'

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:16


OVER โ€‹

โ–ช Static OVER: string = 'drag.over'

Overrides โ€‹

PointerEvent.OVER

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:18


OUT โ€‹

โ–ช Static OUT: string = 'drag.out'

Overrides โ€‹

PointerEvent.OUT

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:19


ENTER โ€‹

โ–ช Static ENTER: string = 'drag.enter'

Overrides โ€‹

PointerEvent.ENTER

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:21


LEAVE โ€‹

โ–ช Static LEAVE: string = 'drag.leave'

Overrides โ€‹

PointerEvent.LEAVE

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:22


moveX โ€‹

โ€ข Readonly moveX: number

Implementation of โ€‹

IDragEvent.moveX

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:24


moveY โ€‹

โ€ข Readonly moveY: number

Implementation of โ€‹

IDragEvent.moveY

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:25


totalX โ€‹

โ€ข Readonly totalX: number

Implementation of โ€‹

IDragEvent.totalX

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:26


totalY โ€‹

โ€ข Readonly totalY: number

Implementation of โ€‹

IDragEvent.totalY

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:27


list โ€‹

โ–ช Static list: ILeafList

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:29


data โ€‹

โ–ช Static data: IObject

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:30


POINTER โ€‹

โ–ช Static POINTER: string = 'pointer'

Inherited from โ€‹

PointerEvent.POINTER

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:10


BEFORE_DOWN โ€‹

โ–ช Static BEFORE_DOWN: string = 'pointer.before_down'

Inherited from โ€‹

PointerEvent.BEFORE_DOWN

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:12


BEFORE_MOVE โ€‹

โ–ช Static BEFORE_MOVE: string = 'pointer.before_move'

Inherited from โ€‹

PointerEvent.BEFORE_MOVE

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:13


BEFORE_UP โ€‹

โ–ช Static BEFORE_UP: string = 'pointer.before_up'

Inherited from โ€‹

PointerEvent.BEFORE_UP

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:14


DOWN โ€‹

โ–ช Static DOWN: string = 'pointer.down'

Inherited from โ€‹

PointerEvent.DOWN

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:16


MOVE โ€‹

โ–ช Static MOVE: string = 'pointer.move'

Inherited from โ€‹

PointerEvent.MOVE

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:17


UP โ€‹

โ–ช Static UP: string = 'pointer.up'

Inherited from โ€‹

PointerEvent.UP

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:18


TAP โ€‹

โ–ช Static TAP: string = 'tap'

Inherited from โ€‹

PointerEvent.TAP

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:26


DOUBLE_TAP โ€‹

โ–ช Static DOUBLE_TAP: string = 'double_tap'

Inherited from โ€‹

PointerEvent.DOUBLE_TAP

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:27


CLICK โ€‹

โ–ช Static CLICK: string = 'click'

Inherited from โ€‹

PointerEvent.CLICK

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:29


DOUBLE_CLICK โ€‹

โ–ช Static DOUBLE_CLICK: string = 'double_click'

Inherited from โ€‹

PointerEvent.DOUBLE_CLICK

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:30


LONG_PRESS โ€‹

โ–ช Static LONG_PRESS: string = 'long_press'

Inherited from โ€‹

PointerEvent.LONG_PRESS

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:32


LONG_TAP โ€‹

โ–ช Static LONG_TAP: string = 'long_tap'

Inherited from โ€‹

PointerEvent.LONG_TAP

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:33


โ–ช Static MENU: string = 'pointer.menu'

Inherited from โ€‹

PointerEvent.MENU

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:35


โ–ช Static MENU_TAP: string = 'pointer.menu_tap'

Inherited from โ€‹

PointerEvent.MENU_TAP

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:36


width โ€‹

โ€ข Readonly width: number

Implementation of โ€‹

IDragEvent.width

Inherited from โ€‹

PointerEvent.width

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:38


height โ€‹

โ€ข Readonly height: number

Implementation of โ€‹

IDragEvent.height

Inherited from โ€‹

PointerEvent.height

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:39


pointerType โ€‹

โ€ข Readonly pointerType: PointerType

Implementation of โ€‹

IDragEvent.pointerType

Inherited from โ€‹

PointerEvent.pointerType

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:40


multiTouch โ€‹

โ€ข Optional Readonly multiTouch: boolean

Implementation of โ€‹

IDragEvent.multiTouch

Inherited from โ€‹

PointerEvent.multiTouch

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:41


pressure โ€‹

โ€ข Readonly pressure: number

Implementation of โ€‹

IDragEvent.pressure

Inherited from โ€‹

PointerEvent.pressure

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:42


tangentialPressure โ€‹

โ€ข Optional Readonly tangentialPressure: number

Implementation of โ€‹

IDragEvent.tangentialPressure

Inherited from โ€‹

PointerEvent.tangentialPressure

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:43


tiltX โ€‹

โ€ข Optional Readonly tiltX: number

Implementation of โ€‹

IDragEvent.tiltX

Inherited from โ€‹

PointerEvent.tiltX

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:44


tiltY โ€‹

โ€ข Optional Readonly tiltY: number

Implementation of โ€‹

IDragEvent.tiltY

Inherited from โ€‹

PointerEvent.tiltY

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:45


twist โ€‹

โ€ข Optional Readonly twist: number

Implementation of โ€‹

IDragEvent.twist

Inherited from โ€‹

PointerEvent.twist

Defined in โ€‹

ui/packages/event/src/PointerEvent.ts:46


x โ€‹

โ€ข Readonly x: number

Implementation of โ€‹

IDragEvent.x

Inherited from โ€‹

PointerEvent.x

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:10


y โ€‹

โ€ข Readonly y: number

Implementation of โ€‹

IDragEvent.y

Inherited from โ€‹

PointerEvent.y

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:11


path โ€‹

โ€ข Readonly path: ILeafList

Implementation of โ€‹

IDragEvent.path

Inherited from โ€‹

PointerEvent.path

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:13


throughPath โ€‹

โ€ข Optional Readonly throughPath: ILeafList

Implementation of โ€‹

IDragEvent.throughPath

Inherited from โ€‹

PointerEvent.throughPath

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:14


altKey โ€‹

โ€ข Readonly altKey: boolean

Implementation of โ€‹

IDragEvent.altKey

Inherited from โ€‹

PointerEvent.altKey

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:16


ctrlKey โ€‹

โ€ข Readonly ctrlKey: boolean

Implementation of โ€‹

IDragEvent.ctrlKey

Inherited from โ€‹

PointerEvent.ctrlKey

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:17


shiftKey โ€‹

โ€ข Readonly shiftKey: boolean

Implementation of โ€‹

IDragEvent.shiftKey

Inherited from โ€‹

PointerEvent.shiftKey

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:18


metaKey โ€‹

โ€ข Readonly metaKey: boolean

Implementation of โ€‹

IDragEvent.metaKey

Inherited from โ€‹

PointerEvent.metaKey

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:19


buttons โ€‹

โ€ข Readonly buttons: number

Implementation of โ€‹

IDragEvent.buttons

Inherited from โ€‹

PointerEvent.buttons

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:25


target โ€‹

โ€ข Readonly target: ILeaf

Implementation of โ€‹

IDragEvent.target

Inherited from โ€‹

PointerEvent.target

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:27


current โ€‹

โ€ข Readonly current: ILeaf

Implementation of โ€‹

IDragEvent.current

Inherited from โ€‹

PointerEvent.current

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:28


bubbles โ€‹

โ€ข Readonly bubbles: boolean = true

Implementation of โ€‹

IDragEvent.bubbles

Inherited from โ€‹

PointerEvent.bubbles

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:29

Accessors โ€‹

spaceKey โ€‹

โ€ข get spaceKey(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IDragEvent.spaceKey

Inherited from โ€‹

PointerEvent.spaceKey

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:20


left โ€‹

โ€ข get left(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IDragEvent.left

Inherited from โ€‹

PointerEvent.left

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:22


โ€ข get right(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IDragEvent.right

Inherited from โ€‹

PointerEvent.right

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:23


middle โ€‹

โ€ข get middle(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IDragEvent.middle

Inherited from โ€‹

PointerEvent.middle

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:24

Methods โ€‹

stopDefault โ€‹

โ–ธ stopDefault(): void

Returns โ€‹

void

Implementation of โ€‹

IDragEvent.stopDefault

Inherited from โ€‹

PointerEvent.stopDefault

Defined in โ€‹

leafer/packages/event/src/Event.ts:25


stopNow โ€‹

โ–ธ stopNow(): void

Returns โ€‹

void

Implementation of โ€‹

IDragEvent.stopNow

Inherited from โ€‹

PointerEvent.stopNow

Defined in โ€‹

leafer/packages/event/src/Event.ts:30


stop โ€‹

โ–ธ stop(): void

Returns โ€‹

void

Implementation of โ€‹

IDragEvent.stop

Inherited from โ€‹

PointerEvent.stop

Defined in โ€‹

leafer/packages/event/src/Event.ts:36


setList โ€‹

โ–ธ setList(data): void

Parameters โ€‹

NameType
dataILeaf | ILeaf[] | ILeafList

Returns โ€‹

void

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:32


setData โ€‹

โ–ธ setData(data): void

Parameters โ€‹

NameType
dataIObject

Returns โ€‹

void

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:36


getValidMove โ€‹

โ–ธ getValidMove(leaf, start, total): IPointData

Parameters โ€‹

NameType
leafILeaf
startIPointData
totalIPointData

Returns โ€‹

IPointData

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:40


getMoveInDragBounds โ€‹

โ–ธ getMoveInDragBounds(childBox, dragBounds, move, change?): IPointData

Parameters โ€‹

NameType
childBoxIBoundsData
dragBoundsIBoundsData
moveIPointData
change?boolean

Returns โ€‹

IPointData

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:51


getPageMove โ€‹

โ–ธ getPageMove(total?): IPointData

Parameters โ€‹

NameType
total?boolean

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getPageMove

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:73


getInnerMove โ€‹

โ–ธ getInnerMove(relative?, total?): IPointData

Parameters โ€‹

NameType
relative?ILeaf
total?boolean

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getInnerMove

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:78


getLocalMove โ€‹

โ–ธ getLocalMove(relative?, total?): IPointData

Parameters โ€‹

NameType
relative?ILeaf
total?boolean

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getLocalMove

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:84


getPageTotal โ€‹

โ–ธ getPageTotal(): IPointData

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getPageTotal

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:90


getInnerTotal โ€‹

โ–ธ getInnerTotal(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getInnerTotal

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:94


getLocalTotal โ€‹

โ–ธ getLocalTotal(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getLocalTotal

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:98


getPageBounds โ€‹

โ–ธ getPageBounds(): IBoundsData

Returns โ€‹

IBoundsData

Implementation of โ€‹

IDragEvent.getPageBounds

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:102


assignMove โ€‹

โ–ธ assignMove(total): void

Parameters โ€‹

NameType
totalboolean

Returns โ€‹

void

Defined in โ€‹

ui/packages/event/src/DragEvent.ts:111


getBoxPoint โ€‹

โ–ธ getBoxPoint(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getBoxPoint

Inherited from โ€‹

PointerEvent.getBoxPoint

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:36


getInnerPoint โ€‹

โ–ธ getInnerPoint(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getInnerPoint

Inherited from โ€‹

PointerEvent.getInnerPoint

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:41


getLocalPoint โ€‹

โ–ธ getLocalPoint(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getLocalPoint

Inherited from โ€‹

PointerEvent.getLocalPoint

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:46


getPagePoint โ€‹

โ–ธ getPagePoint(): IPointData

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getPagePoint

Inherited from โ€‹

PointerEvent.getPagePoint

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:51


getInner โ€‹

โ–ธ getInner(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getInner

Inherited from โ€‹

PointerEvent.getInner

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:56


getLocal โ€‹

โ–ธ getLocal(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getLocal

Inherited from โ€‹

PointerEvent.getLocal

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:57


getPage โ€‹

โ–ธ getPage(): IPointData

Returns โ€‹

IPointData

Implementation of โ€‹

IDragEvent.getPage

Inherited from โ€‹

PointerEvent.getPage

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:58


changeName โ€‹

โ–ธ changeName(oldName, newName): void

Parameters โ€‹

NameType
oldNamestring
newNamestring

Returns โ€‹

void

Inherited from โ€‹

PointerEvent.changeName

Defined in โ€‹

ui/packages/event/src/UIEvent.ts:60

Released under the MIT License.