[llvm-commits] [LNT] r164294 - in /lnt/trunk/lnt/server/ui/static/flot: jquery.flot.touch.js jquery.flot.touch.min.js
Michael Gottesman
mgottesman at apple.com
Thu Sep 20 00:13:44 PDT 2012
Author: mgottesman
Date: Thu Sep 20 02:13:44 2012
New Revision: 164294
URL: http://llvm.org/viewvc/llvm-project?rev=164294&view=rev
Log:
[LNT] I forgot to remove a few console.log statements from
jquery.flot.touch.js.
Modified:
lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.js
lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.min.js
Modified: lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.js
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.js?rev=164294&r1=164293&r2=164294&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.js (original)
+++ lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.js Thu Sep 20 02:13:44 2012
@@ -89,15 +89,11 @@
// Do the pan and or double click if it was quick.
if (isOneTouch && !isPan) {
- console.log('At touch end. Trying to double click.');
var now = new Date().getTime();
var lasttime = lastTouchTime || now + 1; // now + 1 so the first time we are negative.
var delta = now - lasttime;
- console.log("Now: " + now.toString() + "; LastTime: " + lasttime.toString() + " Delta: " + delta.toString());
-
if (delta < 500 && delta > 0) {
- console.log('Double touch success.');
// We have a double touch.
plot.zoom({ center: { left: lastDoubleTouchCenter[0],
top: lastDoubleTouchCenter[1] }});
Modified: lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.min.js
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.min.js?rev=164294&r1=164293&r2=164294&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.min.js (original)
+++ lnt/trunk/lnt/server/ui/static/flot/jquery.flot.touch.min.js Thu Sep 20 02:13:44 2012
@@ -1,4 +1,3 @@
-(function(h){h.plot.plugins.push({init:function(c){var e=!1,i=!1,j=!1,k=[0,0],l=[0,0],f=[0,0],g=Infinity,m=null;c.hooks.bindEvents.push(function(d){if(!1!==d.getOptions().touch.enabled){var c=d.getPlaceholder();c.bind("touchstart",function(a){var a=a.originalEvent.touches,b=d.offset();1===a.length?(e=!0,f=[a[0].pageX,a[0].pageY],l=[a[0].pageX-b.left,a[0].pageY-b.top]):2===a.length&&(i=!0,k=[(a[1].pageX+a[0].pageX)/2-b.left,(a[1].pageY+a[0].pageY)/2-b.top],b=a[1].pageX-a[0].pageX,a=a[1].pageY-a[0].pageY,
-g=Math.sqrt(b*b+a*a));return!1});c.bind("touchmove",function(a){var b=a.originalEvent.touches;e&&1===b.length?(a=[b[0].pageX,b[0].pageY],d.pan({left:f[0]-a[0],top:f[1]-a[1]}),f=a,j=!0):i&&2===b.length&&(a=b[1].pageX-b[0].pageX,b=b[1].pageY-b[0].pageY,a=Math.sqrt(a*a+b*b),d.zoom({amount:1+(a-g)/g,center:{left:k[0],top:k[1]}}),g=a);return!1});c.bind("touchend",function(){if(e&&!j){console.log("At touch end. Trying to double click.");var a=(new Date).getTime(),b=m||a+1,c=a-b;console.log("Now: "+a.toString()+
-"; LastTime: "+b.toString()+" Delta: "+c.toString());500>c&&0<c?(console.log("Double touch success."),d.zoom({center:{left:l[0],top:l[1]}}),m=null):m=a}return j=i=e=!1})}});c.hooks.shutdown.push(function(c){!1!==c.getOptions().touch.enabled&&c.getPlaceholder().unbind("touchstart").unbind("touchmove").unbind("touchend")});h(document).bind("ready orientationchange",function(){window.scrollTo(0,1);setTimeout(function(){h.plot(placeholder,c.getData(),c.getOptions())},50)})},options:{touch:{enabled:!0}},
-name:"touch",version:"1.0"})})(jQuery);
+(function(h){h.plot.plugins.push({init:function(d){var e=!1,i=!1,j=!1,k=[0,0],l=[0,0],f=[0,0],g=Infinity,m=null;d.hooks.bindEvents.push(function(c){if(!1!==c.getOptions().touch.enabled){var d=c.getPlaceholder();d.bind("touchstart",function(a){var a=a.originalEvent.touches,b=c.offset();1===a.length?(e=!0,f=[a[0].pageX,a[0].pageY],l=[a[0].pageX-b.left,a[0].pageY-b.top]):2===a.length&&(i=!0,k=[(a[1].pageX+a[0].pageX)/2-b.left,(a[1].pageY+a[0].pageY)/2-b.top],b=a[1].pageX-a[0].pageX,a=a[1].pageY-a[0].pageY,
+g=Math.sqrt(b*b+a*a));return!1});d.bind("touchmove",function(a){var b=a.originalEvent.touches;e&&1===b.length?(a=[b[0].pageX,b[0].pageY],c.pan({left:f[0]-a[0],top:f[1]-a[1]}),f=a,j=!0):i&&2===b.length&&(a=b[1].pageX-b[0].pageX,b=b[1].pageY-b[0].pageY,a=Math.sqrt(a*a+b*b),c.zoom({amount:1+(a-g)/g,center:{left:k[0],top:k[1]}}),g=a);return!1});d.bind("touchend",function(){if(e&&!j){var a=(new Date).getTime(),b=a-(m||a+1);500>b&&0<b?(c.zoom({center:{left:l[0],top:l[1]}}),m=null):m=a}return j=i=e=!1})}});
+d.hooks.shutdown.push(function(c){!1!==c.getOptions().touch.enabled&&c.getPlaceholder().unbind("touchstart").unbind("touchmove").unbind("touchend")});h(document).bind("ready orientationchange",function(){window.scrollTo(0,1);setTimeout(function(){h.plot(placeholder,d.getData(),d.getOptions())},50)})},options:{touch:{enabled:!0}},name:"touch",version:"1.0"})})(jQuery);
More information about the llvm-commits
mailing list