About gestures

An application can provide different ways for the user to interact with it, for example, touch or mouse gestures. A gesture can be just about any interaction with an area of the screen, from a single touch, or a mouse click to a path traced on the screen. In order to recognize a gesture, the gesture recognizer needs to observe events that occur within a specific area of the screen, referred to as the gesture area. The boundaries of the gesture area are the bounding box of the element on which the author has registered a handler for the gesture event.

An application can provide different ways for the user to interact with it, for example, touch or mouse gestures. A gesture can be just about any interaction with an area of the screen, from a single touch, or a mouse click to a path traced on the screen. In order to recognize a gesture, the gesture recognizer needs to observe events that occur within a specific area of the screen, referred to as the gesture area. The boundaries of the gesture area are the bounding box of the element on which the author has registered a handler for the gesture event.

The following table lists the gestures supported by MCS.

Name Description
Drag

A drag gesture consists of a touch/mousedown event followed by a move, followed by an end event. On touch-based devices, a drag gesture is initiated when the user places a finger on the device screen, within the gesture area, and moves the finger without lifting it from the screen. Note that if the device differentiates between multiple and single touches, then a drag gesture is only initiated by a single touch, otherwise it is initiated by any number of touches. On mouse-based devices, the gesture is initiated when the user presses the mouse button and moves the mouse without releasing the button. An end event is fired when the user removes the finger from the screen, or releases the mouse button.

Swipe

A swipe gesture consists of a touch/mousedown start event within the gesture area, and an end event, i.e. either stopping touching the screen, releasing the mouse button, or moving out of the gesture area.

Drag vs swipe

Drag and swap gestures correspond to the same basic gesture, i.e. a mousedown/touch followed by a move. The main difference between them is that a drag gesture provides continuous feedback during interactions while a swipe gesture does not, i.e. the swipe events are only fired when the user stops touching the screen, releases the mouse button, or moves out of the gesture area.

Drag/Swipe