Mobile Project Add touch screen swipe event [record]

Source: Internet
Author: User

Avalon Touch-Screen Event

Tap, Longtap, Doubletap
Swipe, Swipeleft, swiperight,swipedown,swipeup
Pinch, pinchstart,pinchend,pinchin,pinchout
Drag,dragstart,dragend,
Rotate,rotatestart,rotateend

Mobile Touch Screen event add test (1190000006012676)

Select modules to add such as swipe----require into

Ms-on-swipe= "@fn" (@fnTest ($event))

Fn:function (e) {Console.log (e)}

Fnswipeleft:function (e) {if (e.originalevent.direction== "left") Mstesttouch.swipeleftfn (e);},

SlideWrap.style.left =-(index+1) *100+ "%";

Mobile-double-click (Two-click Time <0.5)

var backsecond = 0;

var cursecond = new Date (). getseconds ();
if (Math.Abs (Cursecond-backsecond) > 0.5) {
Backsecond = Cursecond;
} else {
this.isdoubleclick= "Double click 666";
SetTimeout (function () {
mstesttouch.isdoubleclick= "Click me to Double click";
},1500);
}
Suppress event bubbling
Event.stoppropagation ();

  

Mobile-click Issues

Web End With Ms-on-click

Mobile phone with Ms-on-tap (tap instead of click) click will not work

Write your own double-click out the question temporarily add a

<li><a href= "javascript:void (0)" ms-on-tap= "@fnDoubleClick ($event)" > Gesture phone a--{{@isDoubleClick}}</a ></li>

300-second delay on mobile

Prohibit scaling viewport

Avalon Gets the element that is being manipulated

<li ms-on-tap= "@fnSwipeLeft" > Swipe left to show next </li>

Fnswipeleft:function (e) {var target = E.target;}

Mobile Project Add touchscreen swipe event [record]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.