Commit 53c49b67 authored by Nick Schonning's avatar Nick Schonning

JSCS: Adding missing spaces around operators

parent 339aab91
......@@ -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();
......
......@@ -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) {
......
......@@ -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]) &&
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment