Sha256: 5cc95f33126e57551348b5fbedc115963255304a6010332c784fddc0260f9a4a

Contents?: true

Size: 842 Bytes

Versions: 2

Compression:

Stored size: 842 Bytes

Contents

(function(e){var t=function(e,t){var n=e.data("mousepresstimer");n&&clearTimeout(n),t&&e.unbind("mouseup.mousepressext mouseleave.mousepressext"),e=null};e.event.special.mousepress={setup:function(){var n;e(this).bind("mousedown.mousepressext",function(n){var r=e(this),i=function(s){var o=0;t(r),r.data("mousepresstimer",setInterval(function(){e.event.special.mousepress.handler(r[0],n),o++,o>3&&s>45&&i(s-40)},s))},s=e(n.target).trigger("mousepressstart",[n]);t(r),r.data("mousepresstimer",setTimeout(function(){i(180)},200)),r.bind("mouseup.mousepressext mouseleave.mousepressext",function(e){t(r,!0),s.trigger("mousepressend",[e]),r=null,s=null})})},teardown:function(){t(e(this).unbind(".mousepressext"),!0)},handler:function(t,n){return e.event.handle.call(t,{type:"mousepress",target:n.target,pageX:n.pageX,pageY:n.pageY})}}})(jQuery);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webshims-rails-0.4.6 vendor/assets/javascripts/webshims/minified/extras/mousepress.js
webshims-rails-0.4.5 vendor/assets/javascripts/webshims/minified/extras/mousepress.js