kendo.touch.min.js 6.25 KB
/** 
 * Kendo UI v2016.1.112 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e,define){define("kendo.touch.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,a=e.proxy,o=Math.abs,r=20,u=i.extend({init:function(e,t){function o(e){return function(t){u._triggerTouch(e,t)}}function r(e){return function(t){u.trigger(e,{touches:t.touches,distance:t.distance,center:t.center,event:t.event})}}var u=this;i.fn.init.call(u,e,t),t=u.options,e=u.element,u.wrapper=e,u.events=new n.UserEvents(e,{filter:t.filter,surface:t.surface,minHold:t.minHold,multiTouch:t.multiTouch,allowSelection:!0,fastTap:t.fastTap,press:o("touchstart"),hold:o("hold"),tap:a(u,"_tap"),gesturestart:r("gesturestart"),gesturechange:r("gesturechange"),gestureend:r("gestureend")}),t.enableSwipe?(u.events.bind("start",a(u,"_swipestart")),u.events.bind("move",a(u,"_swipemove"))):(u.events.bind("start",a(u,"_dragstart")),u.events.bind("move",o("drag")),u.events.bind("end",o("dragend"))),n.notify(u)},events:["touchstart","dragstart","drag","dragend","tap","doubletap","hold","swipe","gesturestart","gesturechange","gestureend"],options:{name:"Touch",surface:null,global:!1,fastTap:!1,multiTouch:!1,enableSwipe:!1,minXDelta:30,maxYDelta:20,maxDuration:1e3,minHold:800,doubleTapTimeout:800},cancel:function(){this.events.cancel()},_triggerTouch:function(e,t){this.trigger(e,{touch:t.touch,event:t.event})&&t.preventDefault()},_tap:function(e){var t=this,i=t.lastTap,a=e.touch;i&&t.options.doubleTapTimeout>a.endTime-i.endTime&&n.touchDelta(a,i).distance<r?(t._triggerTouch("doubletap",e),t.lastTap=null):(t._triggerTouch("tap",e),t.lastTap=a)},_dragstart:function(e){this._triggerTouch("dragstart",e)},_swipestart:function(e){2*o(e.x.velocity)>=o(e.y.velocity)&&e.sender.capture()},_swipemove:function(e){var t=this,n=t.options,i=e.touch,a=e.event.timeStamp-i.startTime,r=i.x.initialDelta>0?"right":"left";o(i.x.initialDelta)>=n.minXDelta&&o(i.y.initialDelta)<n.maxYDelta&&n.maxDuration>a&&(t.trigger("swipe",{direction:r,touch:e.touch}),i.cancel())}});n.ui.plugin(u)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
//# sourceMappingURL=kendo.touch.min.js.map