From 53c49b67963747b913624f114469a2972daadd54 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 21 Jan 2014 17:36:59 -0500 Subject: [PATCH] JSCS: Adding missing spaces around operators --- jquery.flot.errorbars.js | 16 ++++++++-------- jquery.flot.js | 8 ++++---- jquery.flot.pie.js | 2 +- jquery.flot.selection.js | 6 +++--- jquery.flot.threshold.js | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/jquery.flot.errorbars.js b/jquery.flot.errorbars.js index f6eef97..282d083 100644 --- a/jquery.flot.errorbars.js +++ b/jquery.flot.errorbars.js @@ -67,13 +67,13 @@ shadowSize and lineWidth are derived as well from the points series. series: { points: { errorbars: null, //should be 'x', 'y' or 'xy' - xerr: { err: "x", show: null, asymmetric: null, upperCap: null, lowerCap: null, color: null, radius: null}, - yerr: { err: "y", show: null, asymmetric: null, upperCap: null, lowerCap: null, color: null, radius: null} + xerr: { err: "x", show: null, asymmetric: null, upperCap: null, lowerCap: null, color: null, radius: null }, + yerr: { err: "y", show: null, asymmetric: null, upperCap: null, lowerCap: null, color: null, radius: null } } } }; - function processRawData(plot, series, data, datapoints){ + function processRawData(plot, series, data, datapoints) { if (!series.points.errorbars) { return; } @@ -107,7 +107,7 @@ shadowSize and lineWidth are derived as well from the points series. datapoints.format = format; } - function parseErrors(series, i){ + function parseErrors(series, i) { var points = series.datapoints.points; @@ -175,7 +175,7 @@ shadowSize and lineWidth are derived as well from the points series. return errRanges; } - function drawSeriesErrors(plot, ctx, s){ + function drawSeriesErrors(plot, ctx, s) { var points = s.datapoints.points, ps = s.datapoints.pointsize, @@ -293,7 +293,7 @@ shadowSize and lineWidth are derived as well from the points series. } } - function drawError(ctx,err,x,y,upper,lower,drawUpper,drawLower,radius,offset,minmax){ + function drawError(ctx,err,x,y,upper,lower,drawUpper,drawLower,radius,offset,minmax) { //shadow offset y += offset; @@ -363,7 +363,7 @@ shadowSize and lineWidth are derived as well from the points series. } } - function drawPath(ctx, pts){ + function drawPath(ctx, pts) { ctx.beginPath(); ctx.moveTo(pts[0][0], pts[0][1]); for (var p = 1; p < pts.length; p++) { @@ -372,7 +372,7 @@ shadowSize and lineWidth are derived as well from the points series. ctx.stroke(); } - function draw(plot, ctx){ + function draw(plot, ctx) { var plotOffset = plot.getPlotOffset(); ctx.save(); diff --git a/jquery.flot.js b/jquery.flot.js index 09b8061..c730275 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -719,7 +719,7 @@ Licensed under the MIT license. eventHolder = null, // jQuery object that events should be bound to ctx = null, octx = null, xaxes = [], yaxes = [], - plotOffset = { left: 0, right: 0, top: 0, bottom: 0}, + plotOffset = { left: 0, right: 0, top: 0, bottom: 0 }, plotWidth = 0, plotHeight = 0, hooks = { processOptions: [], @@ -2327,10 +2327,10 @@ Licensed under the MIT license. bc = options.grid.borderColor; if (typeof bw === "object" || typeof bc === "object") { if (typeof bw !== "object") { - bw = {top: bw, right: bw, bottom: bw, left: bw}; + bw = { top: bw, right: bw, bottom: bw, left: bw }; } if (typeof bc !== "object") { - bc = {top: bc, right: bc, bottom: bc, left: bc}; + bc = { top: bc, right: bc, bottom: bc, left: bc }; } if (bw.top > 0) { @@ -3164,7 +3164,7 @@ Licensed under the MIT license. if (options.legend.container != null) { $(options.legend.container).html(table); } else { - var pos = {"position": "absolute"}, + var pos = { "position": "absolute" }, p = options.legend.position, m = options.legend.margin; if (m[0] == null) { diff --git a/jquery.flot.pie.js b/jquery.flot.pie.js index 27ba038..50662fd 100644 --- a/jquery.flot.pie.js +++ b/jquery.flot.pie.js @@ -565,7 +565,7 @@ More detail and specific examples can be found in the included HTML file. //-- Additional Interactive related functions -- function isPointInPoly(poly, pt) { - for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) { + for (var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) { ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1] < poly[i][1])) && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0]) && diff --git a/jquery.flot.selection.js b/jquery.flot.selection.js index 90a7546..c3a7342 100644 --- a/jquery.flot.selection.js +++ b/jquery.flot.selection.js @@ -82,8 +82,8 @@ The plugin allso adds the following methods to the plot object: function init(plot) { var selection = { - first: { x: -1, y: -1}, - second: { x: -1, y: -1}, + first: { x: -1, y: -1 }, + second: { x: -1, y: -1 }, show: false, active: false, touch: false @@ -329,7 +329,7 @@ The plugin allso adds the following methods to the plot object: eventHolder.mousemove(onMouseMove); eventHolder.mousedown(onMouseDown); eventHolder.bind("touchstart", function(e) { - // Using a touch device, disable mouse events to prevent + // Using a touch device, disable mouse events to prevent // event handlers being called twice eventHolder.unbind("mousedown", onMouseDown); onMouseDown(e); diff --git a/jquery.flot.threshold.js b/jquery.flot.threshold.js index 30b00f6..e172920 100644 --- a/jquery.flot.threshold.js +++ b/jquery.flot.threshold.js @@ -145,7 +145,7 @@ You may need to check for this in hover events. var color = s.threshold.color ? s.threshold.color : "black"; $(".legendLabel").each(function() { - if($(this).text() === s.label) + if ($(this).text() === s.label) { var legend = $(this).prev().find("div > div"); legend.css("border-right-color", color);