vendor/assets/javascripts/kendo/kendo.userevents.min.js in kendoui-rails-0.1.0 vs vendor/assets/javascripts/kendo/kendo.userevents.min.js in kendoui-rails-0.1.1

- old
+ new

@@ -1,11 +1,9 @@ /* -* Kendo UI Web v2013.1.319 (http://kendoui.com) +* Kendo UI Beta v2013.2.716 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * -* Kendo UI Web commercial licenses may be obtained at -* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx -* If you do not own a commercial license, this file shall be governed by the -* GNU General Public License (GPL) version 3. -* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html +* Kendo UI Beta license terms available at +* http://www.kendoui.com/purchase/license-agreement/kendo-ui-beta.aspx */ -("function"==typeof define&&define.amd?define:function(t,e){return e()})(["./kendo.core.min"],function(){(function(t){function e(t,e){var n=t.x.location,i=t.y.location,o=e.x.location,r=e.y.location,a=n-o,s=i-r;return{center:{x:(n+o)/2,y:(i+r)/2},distance:Math.sqrt(a*a+s*s)}}function n(t){var e,n,i,o=[],a=t.originalEvent,s=t.currentTarget,c=0;if(t.api)o.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t});else if(t.type.match(/touch/))for(n=a?a.changedTouches:[],e=n.length;e>c;c++)i=n[c],o.push({location:i,event:t,target:i.target,currentTarget:s,id:i.identifier});else r.pointers?o.push({location:a,event:t,target:t.target,currentTarget:s,id:a.pointerId}):o.push({id:1,event:t,target:t.target,currentTarget:s,location:t});return o}function i(e){e.preventDefault();var n=t(e.data.root),i=n.closest(".k-widget").parent();i[0]||(i=n.parent()),i.trigger(t.Event(e.type,{target:n[0]}))}var o=window.kendo,r=o.support,a=r.pointers,s=window.document,c=t(s.documentElement),u=o.Class,h=o.Observable,l=t.now,d=t.extend,p=r.mobileOS,f=p&&p.android,g="press",v="select",_="start",m="move",T="end",y="cancel",x="tap",w="gesturestart",E="gesturechange",D="gestureend",M="gesturetap",S=u.extend({init:function(t,e){var n=this;n.axis=t,n._updateLocationData(e),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=l()},move:function(t){var e=this,n=t["page"+e.axis],i=l(),o=i-e.timeStamp||1;(n||!f)&&(e.delta=n-e.location,e._updateLocationData(t),e.initialDelta=n-e.startLocation,e.velocity=e.delta/o,e.timeStamp=i)},_updateLocationData:function(t){var e=this,n=e.axis;e.location=t["page"+n],e.client=t["client"+n],e.screen=t["screen"+n]}}),b=u.extend({init:function(t,e,n){var i=this;d(i,{x:new S("X",n.location),y:new S("Y",n.location),userEvents:t,target:e,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,_moved:!1,_finished:!1}),i.notifyInit=function(){i._trigger(g,n)}},move:function(t){var e=this;if(!e._finished){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(k.current&&k.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(m,t)}},end:function(t){var e=this;e.endTime=l(),e._finished||(e._moved?e._trigger(T,t):e._trigger(x,t),e.dispose())},dispose:function(){var e=this,n=e.userEvents,i=n.touches;e._finished=!0,i.splice(t.inArray(e,i),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(t){this.startTime=l(),this._moved=!0,this._trigger(_,t)},_trigger:function(t,e){var n=this,i=e.event,o={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(t,o)&&i.preventDefault()},_withinIgnoreThreshold:function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.userEvents.threshold}}),k=h.extend({init:function(e,n){var i,s,u,l,p,f,S=this,b=o.guid();if(n=n||{},i=S.filter=n.filter,S.threshold=n.threshold||0,S.touches=[],S._maxTouches=n.multiTouch?2:1,S.allowSelection=n.allowSelection,S.eventNS=b,e=t(e).handler(S),h.fn.init.call(S),d(S,{element:e,surface:n.global?c:n.surface||e,stopPropagation:n.stopPropagation,pressed:!1}),S.surface.handler(S).on(o.applyEventMap("move",b),"_move").on(o.applyEventMap("up cancel",b),"_end"),e.on(o.applyEventMap("down",b),i,"_start"),a&&e.css("-ms-touch-action","pinch-zoom double-tap-zoom"),n.preventDragEvent&&e.on(o.applyEventMap("dragstart",b),o.preventDefault),e.on(o.applyEventMap("mousedown selectstart",b),i,{root:e},"_select"),r.eventCapture)for(s=o.eventMap.up.split(" "),u=0,l=s.length,p=S.surface[0],f=function(t){S._isMoved()&&t.preventDefault()};l>u;u++)p.addEventListener(s[u],f,!0);S.bind([g,x,_,m,T,y,w,E,D,M,v],n)},destroy:function(){var t=this;t.element.kendoDestroy(t.eventNS),t.surface.kendoDestroy(t.eventNS),t._disposeAll(),t.unbind()},capture:function(){k.current=this},cancel:function(){this._disposeAll(),this.trigger(y)},notify:function(t,n){var i=this,o=i.touches;if(this._isMultiTouch()){switch(t){case m:t=E;break;case T:t=D;break;case x:t=M}d(n,{touches:o},e(o[0],o[1]))}return this.trigger(t,n)},press:function(t,e,n){this._apiCall("_start",t,e,n)},move:function(t,e){this._apiCall("_move",t,e)},end:function(t,e){this._apiCall("_end",t,e)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){t.each(this.touches,function(){this.dispose()})},_isMoved:function(){return t.grep(this.touches,function(t){return t.isMoved()}).length},_select:function(t){(!this.allowSelection||this.trigger(v,{event:t}))&&i(t)},_start:function(e){var i,o,r=this,a=0,s=r.filter,c=n(e),u=c.length;if(!r._maxTouchesReached())for(k.current=null,r.currentTarget=e.currentTarget,r.stopPropagation&&e.stopPropagation();u>a&&!r._maxTouchesReached();a++)o=c[a],i=s?t(o.currentTarget):r.element,i.length&&(o=new b(r,i,o),r.touches.push(o),o.notifyInit(),r._isMultiTouch()&&r.notify("gesturestart",{}))},_move:function(t){this._eachTouch("move",t)},_end:function(t){this._eachTouch("end",t)},_eachTouch:function(t,e){var i,o,r,a,s=this,c={},u=n(e),h=s.touches;for(i=0;h.length>i;i++)o=h[i],c[o.id]=o;for(i=0;u.length>i;i++)r=u[i],a=c[r.id],a&&a[t](r)},_apiCall:function(e,n,i,o){this[e]({api:!0,pageX:n,pageY:i,target:o||this.element,stopPropagation:t.noop,preventDefault:t.noop})}});o.getTouches=n,o.touchDelta=e,o.UserEvents=k})(window.kendo.jQuery)}); + +("function"==typeof define&&define.amd?define:function(e,t){return t()})(["./kendo.core.min"],function(){!function(e){function t(e,t){var n=e.x.location,i=e.y.location,o=t.x.location,r=t.y.location,a=n-o,s=i-r;return{center:{x:(n+o)/2,y:(i+r)/2},distance:Math.sqrt(a*a+s*s)}}function n(e){var t,n,i,o=[],r=e.originalEvent,s=e.currentTarget,c=0;if(e.api)o.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e});else if(e.type.match(/touch/))for(n=r?r.changedTouches:[],t=n.length;t>c;c++)i=n[c],o.push({location:i,event:e,target:i.target,currentTarget:s,id:i.identifier});else a.pointers?o.push({location:r,event:e,target:e.target,currentTarget:s,id:r.pointerId}):o.push({id:1,event:e,target:e.target,currentTarget:s,location:e});return o}function i(t){var n,i,o;t.preventDefault(),n=e(t.data.root),i=n.closest(".k-widget").parent(),i[0]||(i=n.parent()),o=e.extend(!0,{},t,{target:n[0]}),i.trigger(e.Event(t.type,o))}function o(e){for(var t=r.eventMap.up.split(" "),n=0,i=t.length;i>n;n++)e(t[n])}var r=window.kendo,a=r.support,s=window.document,c=r.Class,u=r.Observable,l=e.now,h=e.extend,d=a.mobileOS,p=d&&d.android,f=a.browser.ie?5:0,v="press",g="select",_="start",m="move",y="end",T="cancel",x="tap",M="release",w="gesturestart",D="gesturechange",E="gestureend",I="gesturetap",b=c.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=l()},move:function(e){var t=this,n=e["page"+t.axis],i=l(),o=i-t.timeStamp||1;(n||!p)&&(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/o,t.timeStamp=i)},_updateLocationData:function(e){var t=this,n=t.axis;t.location=e["page"+n],t.client=e["client"+n],t.screen=e["screen"+n]}}),S=c.extend({init:function(e,t,n){var i=this;h(i,{x:new b("X",n.location),y:new b("Y",n.location),userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,_moved:!1,_finished:!1}),i.notifyInit=function(){i._trigger(v,n)}},move:function(e){var t=this;if(!t._finished){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(k.current&&k.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(m,e)}},end:function(e){var t=this;t.endTime=l(),t._finished||(t._moved?t._trigger(y,e):t._trigger(x,e),t._trigger(M,e),t.dispose())},dispose:function(){var t=this,n=t.userEvents,i=n.touches;t._finished=!0,i.splice(e.inArray(t,i),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){this.startTime=l(),this._moved=!0,this._trigger(_,e)},_trigger:function(e,t){var n=this,i=t.event,o={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,o)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.userEvents.threshold}}),k=u.extend({init:function(t,n){var i,c,l,d=this,p=r.guid();n=n||{},i=d.filter=n.filter,d.threshold=n.threshold||f,d.touches=[],d._maxTouches=n.multiTouch?2:1,d.allowSelection=n.allowSelection,d.captureUpIfMoved=n.captureUpIfMoved,d.eventNS=p,t=e(t).handler(d),u.fn.init.call(d),h(d,{element:t,surface:n.global?e(s.documentElement):e(n.surface||t),stopPropagation:n.stopPropagation,pressed:!1}),d.surface.handler(d).on(r.applyEventMap("move",p),"_move").on(r.applyEventMap("up cancel",p),"_end"),t.on(r.applyEventMap("down",p),i,"_start"),a.pointers&&t.css("-ms-touch-action","pinch-zoom double-tap-zoom"),n.preventDragEvent&&t.on(r.applyEventMap("dragstart",p),r.preventDefault),t.on(r.applyEventMap("mousedown selectstart",p),i,{root:t},"_select"),d.captureUpIfMoved&&a.eventCapture&&(c=d.surface[0],l=e.proxy(d.preventIfMoving,d),o(function(e){c.addEventListener(e,l,!0)})),d.bind([v,x,_,m,y,M,T,w,D,E,I,g],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&a.eventCapture&&(e=t.surface[0],o(function(n){e.removeEventListener(n,t.preventIfMoving)})),t.element.kendoDestroy(t.eventNS),t.surface.kendoDestroy(t.eventNS),t.element.removeData("handler"),t.surface.removeData("handler"),t._disposeAll(),t.unbind(),delete t.surface,delete t.element)},capture:function(){k.current=this},cancel:function(){this._disposeAll(),this.trigger(T)},notify:function(e,n){var i=this,o=i.touches;if(this._isMultiTouch()){switch(e){case m:e=D;break;case y:e=E;break;case x:e=I}h(n,{touches:o},t(o[0],o[1]))}return this.trigger(e,n)},press:function(e,t,n){this._apiCall("_start",e,t,n)},move:function(e,t){this._apiCall("_move",e,t)},end:function(e,t){this._apiCall("_end",e,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){e.each(this.touches,function(){this.dispose()})},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){(!this.allowSelection||this.trigger(g,{event:e}))&&i(e)},_start:function(t){var i,o,r=this,a=0,s=r.filter,c=n(t),u=c.length;if(!r._maxTouchesReached())for(k.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();u>a&&!r._maxTouchesReached();a++)o=c[a],i=s?e(o.currentTarget):r.element,i.length&&(o=new S(r,i,o),r.touches.push(o),o.notifyInit(),r._isMultiTouch()&&r.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_eachTouch:function(e,t){var i,o,r,a,s=this,c={},u=n(t),l=s.touches;for(i=0;i<l.length;i++)o=l[i],c[o.id]=o;for(i=0;i<u.length;i++)r=u[i],a=c[r.id],a&&a[e](r)},_apiCall:function(t,n,i,o){this[t]({api:!0,pageX:n,pageY:i,target:o||this.element,stopPropagation:e.noop,preventDefault:e.noop})}});r.getTouches=n,r.touchDelta=t,r.UserEvents=k}(window.kendo.jQuery)}); \ No newline at end of file