Class: GestureEventManager

olympe.ui.events. GestureEventManager

Manages gesture events.


new GestureEventManager(uiProxy)

Creates an instance of GestureEventManager.

Parameters:
Name Type Description
uiProxy olympe.uiapi.UIElement
Implements:

Extends

Methods


getEventHorizontalPan()

Gets the 'Horizontal Pan' events.

Horizontal Pan is a touch move / mousedown+mousemove performed horizontally

Implements:
Returns:

Data flow of gesture events

Type
olympe.df.Proxy.<olympe.ui.events.GestureEvent> | olympe.ui.events.GestureEvent

getEventHorizontalSwipe()

Gets the 'Horizontal Swipe' events.

Horizontal Swipe is quick touch move + released / mouse move + released performed horizontally.

Implements:
Returns:

Data flow of gesture events

Type
olympe.df.Proxy.<olympe.ui.events.GestureEvent> | olympe.ui.events.GestureEvent

getEventLongPress( [time])

Gets the 'Long Press' events.

LongPress gesture is a long mouse down or a long touch down (250ms).

Parameters:
Name Type Argument Default Description
time number <optional>
250

Time needed to press before emitting the event.

Implements:
Returns:

Data flow of gesture events

Type
olympe.df.Proxy.<olympe.ui.events.GestureEvent> | olympe.ui.events.GestureEvent

getEventLongPressUp()

Gets the 'Long Press Up' events.

Long Press Up event is a touch down performed during 250ms on this element and released.

Implements:
Returns:

Data flow of gesture events

Type
olympe.df.Proxy.<olympe.ui.events.GestureEvent> | olympe.ui.events.GestureEvent

getEventPinch()

Gets the 'Pinch' events.

Pinch gesture is a two fingers touchdown typically used to zoom in or out.

Implements:
Returns:

Data flow of gesture events

Type
olympe.df.Proxy.<olympe.ui.events.GestureEvent> | olympe.ui.events.GestureEvent

getEventRotate()

Gets the 'Rotate' events.

Rotate gesture is a two fingers touchdown rotation.

Implements:
Returns:

Data flow of gesture events

Type
olympe.df.Proxy.<olympe.ui.events.GestureEvent> | olympe.ui.events.GestureEvent

getEventVerticalPan()

Gets the 'Vertical Pan' events.

Vertical Pan is a touch move / mousedown+mousemove performed vertically

Implements:
Returns:

Data flow of gesture events

Type
olympe.df.Proxy.<olympe.ui.events.GestureEvent> | olympe.ui.events.GestureEvent

getEventVerticalSwipe()

Gets the 'Vertical Swipe' events.

Vertical Swipe is quick touch move + released / mouse move + released performed vertically.

Implements:
Returns:

Data flow of gesture events

Type
olympe.df.Proxy.<olympe.ui.events.GestureEvent> | olympe.ui.events.GestureEvent

<protected> offEvent(id, callbackList)

Removes a specific callback from a callback list.

Parameters:
Name Type Description
id string | olympe.df.Proxy.<string>

ID of the callback to remove

callbackList olympe.ui.events.EventCallbackList

callback list

Inherited From:
Overrides:

offHorizontalPan(id)

Unregisters a callback from the 'Horizontal Pan' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onHorizontalPan)

Implements:

offHorizontalSwipe(id)

Unregisters a callback from the 'Horizontal Swipe' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onHorizontalSwipe)

Implements:

offLongPress(id)

Unregisters a callback from the 'Long Press' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onLongPress)

Implements:

offLongPressUp(id)

Unregisters a callback from the 'Long Press Up' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onLongPressUp)

Implements:

offPinch(id)

Unregisters a callback from the 'Pinch' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onPinch)

Implements:

offRotate(id)

Unregisters a callback from the 'Rotate' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onRotate)

Implements:

offVerticalPan(id)

Unregisters a callback from the 'Vertical Pan' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onVerticalPan)

Implements:

offVerticalSwipe(id)

Unregisters a callback from the 'Vertical Swipe' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onVerticalSwipe)

Implements:

<protected> onEvent(callback, id, priority, callbackList, offFunction)

Creates an EventCallback and add to a list of callbacks, inserting it according to its priority.

Parameters:
Name Type Description
callback function

the function to associate to the callback

id string | undefined

ID for this new callback

priority number | undefined

Priority for the new callback.

callbackList olympe.ui.events.EventCallbackList

the list to add this callback to

offFunction function

Function to execute when the context is destroyed

Inherited From:
Overrides:
Returns:

Id ID of the created callback

Type
string

onHorizontalPan(callback [, id] [, priority])

Registers a callback for the 'Horizontal Pan' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnGestureEventCallback
id string <optional>

Id of event auto-generated if omitted, necessary to unregister

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
See:
Returns:

Id of the callback

Type
string

onHorizontalSwipe(callback [, id] [, priority])

Registers a callback for the 'Horizontal Swipe' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnGestureEventCallback
id string <optional>

Id of event auto-generated if omitted, necessary to unregister

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
See:
Returns:

Id of the callback

Type
string

onLongPress(callback [, id] [, priority] [, time])

Registers a callback for 'Long Press' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnGestureEventCallback
id string <optional>

Id of event auto-generated if omitted, necessary to unregister

priority number <optional>
0

Priority of event (higher number = higher priority)

time number <optional>
250

Time needed to press before emitting the event.

Implements:
See:
Returns:

Id of the callback

Type
string

onLongPressUp(callback [, id] [, priority])

Registers a callback for 'Long Press Up' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnGestureEventCallback
id string <optional>

Id of event auto-generated if omitted, necessary to unregister

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
See:
Returns:

Id of the callback

Type
string

onPinch(callback [, id] [, priority])

Registers a callback for 'Pinch' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnGestureEventCallback
id string <optional>

Id of event auto-generated if omitted, necessary to unregister

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
See:
Returns:

Id of the callback

Type
string

onRotate(callback [, id] [, priority])

Registers a callback for 'Rotate' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnGestureEventCallback
id string <optional>

Id of event auto-generated if omitted, necessary to unregister

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
See:
Returns:

Id of the callback

Type
string

onVerticalPan(callback [, id] [, priority])

Registers a callback for the 'Vertical Pan' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnGestureEventCallback
id string <optional>

Id of event auto-generated if omitted, necessary to unregister

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
See:
Returns:

Id of the callback

Type
string

onVerticalSwipe(callback [, id] [, priority])

Registers a callback for the 'Vertical Swipe' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnGestureEventCallback
id string <optional>

Id of event auto-generated if omitted, necessary to unregister

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
See:
  • getEventVerticalSwipe
Returns:

Id of the callback

Type
string

<protected> registerOnEvent(event, eventsList)

Registers a list of callbacks to an Event.

Parameters:
Name Type Description
event olympe.df.Proxy.<olympe.ui.events.Event> | olympe.ui.events.Event
eventsList olympe.ui.events.EventCallbackList
Inherited From:
Overrides: