From b6d392b25bf91ee1d7ee3348620adfc06366b1c9 Mon Sep 17 00:00:00 2001 From: Neil Katin Date: Mon, 2 Dec 2013 21:54:40 -0800 Subject: [PATCH] Fix jslint issues with previous version --- jquery.flot.selection.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jquery.flot.selection.js b/jquery.flot.selection.js index 8873771..8fbd834 100644 --- a/jquery.flot.selection.js +++ b/jquery.flot.selection.js @@ -111,9 +111,9 @@ The plugin allso adds the following methods to the plot object: } function onMouseDown(e) { - if (e.type === 'touchstart' && e.originalEvent.touches.length === 1) { // only accept single touch + if (e.type === "touchstart" && e.originalEvent.touches.length === 1) { // only accept single touch selection.touch = true; - } else if (e.which != 1 || e.originalEvent.touches && e.originalEvent.touches.length > 1) { // only accept left-click + } else if (e.which !== 1 || e.originalEvent.touches && e.originalEvent.touches.length > 1) { // only accept left-click return; } @@ -328,13 +328,13 @@ The plugin allso adds the following methods to the plot object: if (o.selection.mode != null) { eventHolder.mousemove(onMouseMove); eventHolder.mousedown(onMouseDown); - eventHolder.bind('touchstart', function(e) { + eventHolder.bind("touchstart", function(e) { // Using a touch device, disable mouse events to prevent // event handlers being called twice - eventHolder.unbind('mousedown', onMouseDown); + eventHolder.unbind("mousedown", onMouseDown); onMouseDown(e); - }); - eventHolder.bind('touchmove', onMouseMove); + }); + eventHolder.bind("touchmove", onMouseMove); } });