Classes
Members
(inner) currentGesture :module:player/TouchGestures.Gesture
The currently active gesture handler depending on the amount of touchpoints.
null
, if no touches on the screen.
Type:
- module:player/TouchGestures.Gesture
- Source:
(inner) interactionGestureEnabled :boolean
When playing the presentation, are touch gestures enabled?
Inferred from enableMouseZoom, enableMouseTranslation, or enableMouseRotation in the current presentation.
Type:
- boolean
- Source:
(inner, constant) MAX_FLICK_TIME :number
Max time in ms to accept a touch move as quick swipe gesture
Type:
- number
- Default Value:
- 100
- Source:
(inner, constant) MIN_FLICK_TRAVEL :number
Min distance to accept a touch move as quick swipe gesture.
Threshhold to prevent any touch to be interpreted as swipe.
Type:
- number
- Default Value:
- 20
- Source:
(inner) MIN_SLOW_TRAVEL_X :number
Minimum distance to accept a touch move as slow swipe gesture in horizontal direction.
Value depends on screen size and therefore is (re)calculated
Type:
- number
- Source:
(inner) MIN_SLOW_TRAVEL_Y :number
Minimum distance to accept a touch move as slow swipe gesture in vertical direction.
Value depends on screen size and therefore is (re)calculated
Type:
- number
- Source:
(inner) player :module:player/Player.Player
The current Sozi player.
Type:
- Source:
(inner) presentation :module:model/Presentation.Presentation
The current Sozi presentation.
Type:
- Source:
(inner, constant) ROTATE_THRESHHOLD :number
Tolerance of slight rotation gesture movement assumed to be unintentional.
The Threshhold adds some visual stability to pan movements. Must be exceeded once to accept a rotating gesture.
Type:
- number
- Default Value:
- 10
- Source:
(inner, constant) ZOOM_LOW_THRESHHOLD :number
Lower tolerance of slight zoom gesture movement assumed to be unintentional.
The Threshhold adds some visual stability to pan movements. Must be exceeded once to accept a zoom gesture.
Type:
- number
- Source:
(inner, constant) ZOOM_UP_THRESHHOLD :number
Upper tolerance of slight zoom gesture movement assumed to be unintentional.
The Threshhold adds some visual stability to pan movements. Must be exceeded once to accept a zoom gesture.
Type:
- number
- Default Value:
- 1.5
- Source:
Methods
(static) init(pl, pr)
Initializes touch gestures.
This function adds touch listeners to the given parent.
Parameters:
Name | Type | Description |
---|---|---|
pl |
module:player/Player.Player | The current Player. |
pr |
module:model/Presentation.Presentation | The presentation to play. |
- Source:
(inner) createGesture(touches) → {module:player/TouchGestures.Gesture}
Creates a new gesture handler according to the number of currently applied touches.
If no appropriate handler can be identified according to number of touch points or the presentation's mouse enabled policy, a dummy handler is returned. The dummy does nothing in effect, but avoids the createGesture function to be called repeatedly.
Parameters:
Name | Type | Description |
---|---|---|
touches |
Array.<object> | Array of currently active touches |
- Source:
Returns:
- A new gesture handler matching the number of touches, or
null
if no handler matches.
- Type
- module:player/TouchGestures.Gesture
(inner) onTouchEnd(evt)
Processes a touch end event.
Parameters:
Name | Type | Description |
---|---|---|
evt |
TouchEvent | The DOM event to process. |
- Source:
Listens to Events:
- event:touchend
(inner) onTouchMove(evt)
Processes a touch move event.
Parameters:
Name | Type | Description |
---|---|---|
evt |
TouchEvent | The DOM event to process. |
- Source:
Listens to Events:
- event:touchmove
(inner) onTouchStart(evt)
Processes a touch start event.
Initializes a gesture handler.
Parameters:
Name | Type | Description |
---|---|---|
evt |
TouchEvent | The DOM event to process. |
- Source:
Listens to Events:
- event:touchstart
(inner) updateGesture(touches)
Checks, if the current gesture handler is appropriate for the given touches.
If not, a new gesture handler is put in place.
Parameters:
Name | Type | Description |
---|---|---|
touches |
Array.<object> | Array of currently active touches. |
- Source:
(inner) updateScreenValues()
Updates all parameters depending on screen dimensions.
- Source:
Listens to Events:
- event:resize