Discussion by the gesture caused a browser plug-in

One day, in v2ex see posts, reply to someone mentions whatruns this browser plug-in technology is used to view a Web site used.

Under curiosity, I installed this plugin, whatruns display pwa version of microblogging uses hammer.js, which is an open source database, designed to provide a variety of touch gestures sense for the site, and do not need to install additional dependencies. After developing a mobile terminal site, to enhance the user experience may be useful.

In Getting Startedthere, there are some initialization code,

    var hammertime = new Hammer(myElement, myOptions);
    hammertime.on('pan', function(ev) {
        console.log(ev);
    })

panWhat do you mean, I only know that pan is a pan, and domestic network disk website like add pan in your domain name, so we see that this is a network disk website. The answer given by the Google documents cited Apple's developer site provides explanations,

A pan gesture occurs any time the user moves one or more fingers around the screen. A screen-edge pan gesture is a specialized pan gesture that originates from the edge of the screen.

The effect is that when you move one or more fingers on the screen, it causes a pan gesture, but I still do not understand. So the dictionary, and finally found a verb:

- v.
 1. make a sweeping movement
 "The camera panned across the room"

Why is not this special slide on the screen Well, please speak English (please speak human)! Sometimes a word instead of over-interpreting confusing, for example, some people say can be used for DNA paternity testing, you might respond, however, but said DNA you understand, but you do not know what DNA in the end yes.

Here in extending it, except I know of tap(点按), swipe(滑动), double tap(双击,类似pc端的dbclick), and pinch(缩小), and stretch(放大).

Having said that, I had a question, although I understand the pan as swipe, in fact, they are not exactly the same, so I stackoverflow found more than a 200 years endorsed the answer:

By definition, a swipe gesture is necessarily also a pan gesture -- both involve translational movement of touch points. The difference is in the recognizer semantics: a pan recognizer looks for the beginning of translational movement and continues to report movement in any direction over time, while a swipe recognizer makes an instantaneous decision as to whether the user's touches moved linearly in the required direction.

Briefly, swipe gesture naturally pan gesture, except that, pan gesture sensor recording the initial point translation finger on the screen, and move in any direction during recording trends continue, the swipe gesture is more focused on the user's finger whether the specified direction movement, such as the slide, the left slider. Like user interaction in the left slip delete certainly swipe gestures.

Guess you like

Origin www.cnblogs.com/kylevon/p/11425525.html