Skip to content

Class: SwipeEvent โ€‹

Hierarchy โ€‹

Implements โ€‹

Table of contents โ€‹

Constructors โ€‹

Properties โ€‹

Accessors โ€‹

Methods โ€‹

Constructors โ€‹

constructor โ€‹

โ€ข new SwipeEvent(params): SwipeEvent

Parameters โ€‹

NameType
paramsIUIEvent

Returns โ€‹

SwipeEvent

Inherited from โ€‹

DragEvent.constructor

Defined in โ€‹

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

Properties โ€‹

origin โ€‹

โ€ข Readonly origin: IObject

Implementation of โ€‹

ISwipeEvent.origin

Inherited from โ€‹

DragEvent.origin

Defined in โ€‹

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


type โ€‹

โ€ข Readonly type: string

Implementation of โ€‹

ISwipeEvent.type

Inherited from โ€‹

DragEvent.type

Defined in โ€‹

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


phase โ€‹

โ€ข Readonly phase: number

Implementation of โ€‹

ISwipeEvent.phase

Inherited from โ€‹

DragEvent.phase

Defined in โ€‹

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


isStopDefault โ€‹

โ€ข isStopDefault: boolean

Implementation of โ€‹

ISwipeEvent.isStopDefault

Inherited from โ€‹

DragEvent.isStopDefault

Defined in โ€‹

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


isStop โ€‹

โ€ข isStop: boolean

Implementation of โ€‹

ISwipeEvent.isStop

Inherited from โ€‹

DragEvent.isStop

Defined in โ€‹

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


isStopNow โ€‹

โ€ข isStopNow: boolean

Implementation of โ€‹

ISwipeEvent.isStopNow

Inherited from โ€‹

DragEvent.isStopNow

Defined in โ€‹

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


BEFORE_DRAG โ€‹

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

Inherited from โ€‹

DragEvent.BEFORE_DRAG

Defined in โ€‹

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


START โ€‹

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

Inherited from โ€‹

DragEvent.START

Defined in โ€‹

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


DRAG โ€‹

โ–ช Static DRAG: string = 'drag'

Inherited from โ€‹

DragEvent.DRAG

Defined in โ€‹

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


END โ€‹

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

Inherited from โ€‹

DragEvent.END

Defined in โ€‹

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


OVER โ€‹

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

Inherited from โ€‹

DragEvent.OVER

Defined in โ€‹

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


OUT โ€‹

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

Inherited from โ€‹

DragEvent.OUT

Defined in โ€‹

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


ENTER โ€‹

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

Inherited from โ€‹

DragEvent.ENTER

Defined in โ€‹

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


LEAVE โ€‹

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

Inherited from โ€‹

DragEvent.LEAVE

Defined in โ€‹

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


moveX โ€‹

โ€ข Readonly moveX: number

Implementation of โ€‹

ISwipeEvent.moveX

Inherited from โ€‹

DragEvent.moveX

Defined in โ€‹

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


moveY โ€‹

โ€ข Readonly moveY: number

Implementation of โ€‹

ISwipeEvent.moveY

Inherited from โ€‹

DragEvent.moveY

Defined in โ€‹

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


totalX โ€‹

โ€ข Readonly totalX: number

Implementation of โ€‹

ISwipeEvent.totalX

Inherited from โ€‹

DragEvent.totalX

Defined in โ€‹

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


totalY โ€‹

โ€ข Readonly totalY: number

Implementation of โ€‹

ISwipeEvent.totalY

Inherited from โ€‹

DragEvent.totalY

Defined in โ€‹

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


list โ€‹

โ–ช Static list: ILeafList

Inherited from โ€‹

DragEvent.list

Defined in โ€‹

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


data โ€‹

โ–ช Static data: IObject

Inherited from โ€‹

DragEvent.data

Defined in โ€‹

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


POINTER โ€‹

โ–ช Static POINTER: string = 'pointer'

Inherited from โ€‹

DragEvent.POINTER

Defined in โ€‹

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


BEFORE_DOWN โ€‹

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

Inherited from โ€‹

DragEvent.BEFORE_DOWN

Defined in โ€‹

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


BEFORE_MOVE โ€‹

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

Inherited from โ€‹

DragEvent.BEFORE_MOVE

Defined in โ€‹

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


BEFORE_UP โ€‹

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

Inherited from โ€‹

DragEvent.BEFORE_UP

Defined in โ€‹

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


MOVE โ€‹

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

Inherited from โ€‹

DragEvent.MOVE

Defined in โ€‹

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


TAP โ€‹

โ–ช Static TAP: string = 'tap'

Inherited from โ€‹

DragEvent.TAP

Defined in โ€‹

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


DOUBLE_TAP โ€‹

โ–ช Static DOUBLE_TAP: string = 'double_tap'

Inherited from โ€‹

DragEvent.DOUBLE_TAP

Defined in โ€‹

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


CLICK โ€‹

โ–ช Static CLICK: string = 'click'

Inherited from โ€‹

DragEvent.CLICK

Defined in โ€‹

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


DOUBLE_CLICK โ€‹

โ–ช Static DOUBLE_CLICK: string = 'double_click'

Inherited from โ€‹

DragEvent.DOUBLE_CLICK

Defined in โ€‹

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


LONG_PRESS โ€‹

โ–ช Static LONG_PRESS: string = 'long_press'

Inherited from โ€‹

DragEvent.LONG_PRESS

Defined in โ€‹

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


LONG_TAP โ€‹

โ–ช Static LONG_TAP: string = 'long_tap'

Inherited from โ€‹

DragEvent.LONG_TAP

Defined in โ€‹

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


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

Inherited from โ€‹

DragEvent.MENU

Defined in โ€‹

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


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

Inherited from โ€‹

DragEvent.MENU_TAP

Defined in โ€‹

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


width โ€‹

โ€ข Readonly width: number

Implementation of โ€‹

ISwipeEvent.width

Inherited from โ€‹

DragEvent.width

Defined in โ€‹

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


height โ€‹

โ€ข Readonly height: number

Implementation of โ€‹

ISwipeEvent.height

Inherited from โ€‹

DragEvent.height

Defined in โ€‹

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


pointerType โ€‹

โ€ข Readonly pointerType: PointerType

Implementation of โ€‹

ISwipeEvent.pointerType

Inherited from โ€‹

DragEvent.pointerType

Defined in โ€‹

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


multiTouch โ€‹

โ€ข Optional Readonly multiTouch: boolean

Implementation of โ€‹

ISwipeEvent.multiTouch

Inherited from โ€‹

DragEvent.multiTouch

Defined in โ€‹

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


pressure โ€‹

โ€ข Readonly pressure: number

Implementation of โ€‹

ISwipeEvent.pressure

Inherited from โ€‹

DragEvent.pressure

Defined in โ€‹

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


tangentialPressure โ€‹

โ€ข Optional Readonly tangentialPressure: number

Implementation of โ€‹

ISwipeEvent.tangentialPressure

Inherited from โ€‹

DragEvent.tangentialPressure

Defined in โ€‹

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


tiltX โ€‹

โ€ข Optional Readonly tiltX: number

Implementation of โ€‹

ISwipeEvent.tiltX

Inherited from โ€‹

DragEvent.tiltX

Defined in โ€‹

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


tiltY โ€‹

โ€ข Optional Readonly tiltY: number

Implementation of โ€‹

ISwipeEvent.tiltY

Inherited from โ€‹

DragEvent.tiltY

Defined in โ€‹

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


twist โ€‹

โ€ข Optional Readonly twist: number

Implementation of โ€‹

ISwipeEvent.twist

Inherited from โ€‹

DragEvent.twist

Defined in โ€‹

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


SWIPE โ€‹

โ–ช Static SWIPE: string = 'swipe'

Defined in โ€‹

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


LEFT โ€‹

โ–ช Static LEFT: string = 'swipe.left'

Defined in โ€‹

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


โ–ช Static RIGHT: string = 'swipe.right'

Defined in โ€‹

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


UP โ€‹

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

Overrides โ€‹

DragEvent.UP

Defined in โ€‹

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


DOWN โ€‹

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

Overrides โ€‹

DragEvent.DOWN

Defined in โ€‹

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


speed โ€‹

โ€ข Readonly speed: number

Defined in โ€‹

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


direction โ€‹

โ€ข Readonly direction: string

Defined in โ€‹

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


x โ€‹

โ€ข Readonly x: number

Implementation of โ€‹

ISwipeEvent.x

Inherited from โ€‹

DragEvent.x

Defined in โ€‹

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


y โ€‹

โ€ข Readonly y: number

Implementation of โ€‹

ISwipeEvent.y

Inherited from โ€‹

DragEvent.y

Defined in โ€‹

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


path โ€‹

โ€ข Readonly path: ILeafList

Implementation of โ€‹

ISwipeEvent.path

Inherited from โ€‹

DragEvent.path

Defined in โ€‹

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


throughPath โ€‹

โ€ข Optional Readonly throughPath: ILeafList

Implementation of โ€‹

ISwipeEvent.throughPath

Inherited from โ€‹

DragEvent.throughPath

Defined in โ€‹

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


altKey โ€‹

โ€ข Readonly altKey: boolean

Implementation of โ€‹

ISwipeEvent.altKey

Inherited from โ€‹

DragEvent.altKey

Defined in โ€‹

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


ctrlKey โ€‹

โ€ข Readonly ctrlKey: boolean

Implementation of โ€‹

ISwipeEvent.ctrlKey

Inherited from โ€‹

DragEvent.ctrlKey

Defined in โ€‹

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


shiftKey โ€‹

โ€ข Readonly shiftKey: boolean

Implementation of โ€‹

ISwipeEvent.shiftKey

Inherited from โ€‹

DragEvent.shiftKey

Defined in โ€‹

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


metaKey โ€‹

โ€ข Readonly metaKey: boolean

Implementation of โ€‹

ISwipeEvent.metaKey

Inherited from โ€‹

DragEvent.metaKey

Defined in โ€‹

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


buttons โ€‹

โ€ข Readonly buttons: number

Implementation of โ€‹

ISwipeEvent.buttons

Inherited from โ€‹

DragEvent.buttons

Defined in โ€‹

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


target โ€‹

โ€ข Readonly target: ILeaf

Implementation of โ€‹

ISwipeEvent.target

Inherited from โ€‹

DragEvent.target

Defined in โ€‹

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


current โ€‹

โ€ข Readonly current: ILeaf

Implementation of โ€‹

ISwipeEvent.current

Inherited from โ€‹

DragEvent.current

Defined in โ€‹

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


bubbles โ€‹

โ€ข Readonly bubbles: boolean = true

Implementation of โ€‹

ISwipeEvent.bubbles

Inherited from โ€‹

DragEvent.bubbles

Defined in โ€‹

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

Accessors โ€‹

spaceKey โ€‹

โ€ข get spaceKey(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

ISwipeEvent.spaceKey

Inherited from โ€‹

DragEvent.spaceKey

Defined in โ€‹

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


left โ€‹

โ€ข get left(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

ISwipeEvent.left

Inherited from โ€‹

DragEvent.left

Defined in โ€‹

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


right โ€‹

โ€ข get right(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

ISwipeEvent.right

Inherited from โ€‹

DragEvent.right

Defined in โ€‹

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


middle โ€‹

โ€ข get middle(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

ISwipeEvent.middle

Inherited from โ€‹

DragEvent.middle

Defined in โ€‹

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

Methods โ€‹

stopDefault โ€‹

โ–ธ stopDefault(): void

Returns โ€‹

void

Implementation of โ€‹

ISwipeEvent.stopDefault

Inherited from โ€‹

DragEvent.stopDefault

Defined in โ€‹

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


stopNow โ€‹

โ–ธ stopNow(): void

Returns โ€‹

void

Implementation of โ€‹

ISwipeEvent.stopNow

Inherited from โ€‹

DragEvent.stopNow

Defined in โ€‹

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


stop โ€‹

โ–ธ stop(): void

Returns โ€‹

void

Implementation of โ€‹

ISwipeEvent.stop

Inherited from โ€‹

DragEvent.stop

Defined in โ€‹

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


setList โ€‹

โ–ธ setList(data): void

Parameters โ€‹

NameType
dataILeaf | ILeaf[] | ILeafList

Returns โ€‹

void

Inherited from โ€‹

DragEvent.setList

Defined in โ€‹

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


setData โ€‹

โ–ธ setData(data): void

Parameters โ€‹

NameType
dataIObject

Returns โ€‹

void

Inherited from โ€‹

DragEvent.setData

Defined in โ€‹

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


getValidMove โ€‹

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

Parameters โ€‹

NameType
leafILeaf
startIPointData
totalIPointData

Returns โ€‹

IPointData

Inherited from โ€‹

DragEvent.getValidMove

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

Inherited from โ€‹

DragEvent.getMoveInDragBounds

Defined in โ€‹

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


getPageMove โ€‹

โ–ธ getPageMove(total?): IPointData

Parameters โ€‹

NameType
total?boolean

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getPageMove

Inherited from โ€‹

DragEvent.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 โ€‹

ISwipeEvent.getInnerMove

Inherited from โ€‹

DragEvent.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 โ€‹

ISwipeEvent.getLocalMove

Inherited from โ€‹

DragEvent.getLocalMove

Defined in โ€‹

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


getPageTotal โ€‹

โ–ธ getPageTotal(): IPointData

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getPageTotal

Inherited from โ€‹

DragEvent.getPageTotal

Defined in โ€‹

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


getInnerTotal โ€‹

โ–ธ getInnerTotal(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getInnerTotal

Inherited from โ€‹

DragEvent.getInnerTotal

Defined in โ€‹

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


getLocalTotal โ€‹

โ–ธ getLocalTotal(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getLocalTotal

Inherited from โ€‹

DragEvent.getLocalTotal

Defined in โ€‹

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


getPageBounds โ€‹

โ–ธ getPageBounds(): IBoundsData

Returns โ€‹

IBoundsData

Implementation of โ€‹

ISwipeEvent.getPageBounds

Inherited from โ€‹

DragEvent.getPageBounds

Defined in โ€‹

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


assignMove โ€‹

โ–ธ assignMove(total): void

Parameters โ€‹

NameType
totalboolean

Returns โ€‹

void

Inherited from โ€‹

DragEvent.assignMove

Defined in โ€‹

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


getBoxPoint โ€‹

โ–ธ getBoxPoint(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getBoxPoint

Inherited from โ€‹

DragEvent.getBoxPoint

Defined in โ€‹

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


getInnerPoint โ€‹

โ–ธ getInnerPoint(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getInnerPoint

Inherited from โ€‹

DragEvent.getInnerPoint

Defined in โ€‹

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


getLocalPoint โ€‹

โ–ธ getLocalPoint(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getLocalPoint

Inherited from โ€‹

DragEvent.getLocalPoint

Defined in โ€‹

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


getPagePoint โ€‹

โ–ธ getPagePoint(): IPointData

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getPagePoint

Inherited from โ€‹

DragEvent.getPagePoint

Defined in โ€‹

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


getInner โ€‹

โ–ธ getInner(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getInner

Inherited from โ€‹

DragEvent.getInner

Defined in โ€‹

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


getLocal โ€‹

โ–ธ getLocal(relative?): IPointData

Parameters โ€‹

NameType
relative?ILeaf

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getLocal

Inherited from โ€‹

DragEvent.getLocal

Defined in โ€‹

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


getPage โ€‹

โ–ธ getPage(): IPointData

Returns โ€‹

IPointData

Implementation of โ€‹

ISwipeEvent.getPage

Inherited from โ€‹

DragEvent.getPage

Defined in โ€‹

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


changeName โ€‹

โ–ธ changeName(oldName, newName): void

Parameters โ€‹

NameType
oldNamestring
newNamestring

Returns โ€‹

void

Inherited from โ€‹

DragEvent.changeName

Defined in โ€‹

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

Released under the MIT License.