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. ...@@ -67,13 +67,13 @@ shadowSize and lineWidth are derived as well from the points series.
series: { series: {
points: { points: {
errorbars: null, //should be 'x', 'y' or 'xy' errorbars: null, //should be 'x', 'y' or 'xy'
xerr: { err: "x", 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} 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) { if (!series.points.errorbars) {
return; return;
} }
...@@ -107,7 +107,7 @@ shadowSize and lineWidth are derived as well from the points series. ...@@ -107,7 +107,7 @@ shadowSize and lineWidth are derived as well from the points series.
datapoints.format = format; datapoints.format = format;
} }
function parseErrors(series, i){ function parseErrors(series, i) {
var points = series.datapoints.points; var points = series.datapoints.points;
...@@ -175,7 +175,7 @@ shadowSize and lineWidth are derived as well from the points series. ...@@ -175,7 +175,7 @@ shadowSize and lineWidth are derived as well from the points series.
return errRanges; return errRanges;
} }
function drawSeriesErrors(plot, ctx, s){ function drawSeriesErrors(plot, ctx, s) {
var points = s.datapoints.points, var points = s.datapoints.points,
ps = s.datapoints.pointsize, ps = s.datapoints.pointsize,
...@@ -293,7 +293,7 @@ shadowSize and lineWidth are derived as well from the points series. ...@@ -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 //shadow offset
y += offset; y += offset;
...@@ -363,7 +363,7 @@ shadowSize and lineWidth are derived as well from the points series. ...@@ -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.beginPath();
ctx.moveTo(pts[0][0], pts[0][1]); ctx.moveTo(pts[0][0], pts[0][1]);
for (var p = 1; p < pts.length; p++) { for (var p = 1; p < pts.length; p++) {
...@@ -372,7 +372,7 @@ shadowSize and lineWidth are derived as well from the points series. ...@@ -372,7 +372,7 @@ shadowSize and lineWidth are derived as well from the points series.
ctx.stroke(); ctx.stroke();
} }
function draw(plot, ctx){ function draw(plot, ctx) {
var plotOffset = plot.getPlotOffset(); var plotOffset = plot.getPlotOffset();
ctx.save(); ctx.save();
......
...@@ -719,7 +719,7 @@ Licensed under the MIT license. ...@@ -719,7 +719,7 @@ Licensed under the MIT license.
eventHolder = null, // jQuery object that events should be bound to eventHolder = null, // jQuery object that events should be bound to
ctx = null, octx = null, ctx = null, octx = null,
xaxes = [], yaxes = [], xaxes = [], yaxes = [],
plotOffset = { left: 0, right: 0, top: 0, bottom: 0}, plotOffset = { left: 0, right: 0, top: 0, bottom: 0 },
plotWidth = 0, plotHeight = 0, plotWidth = 0, plotHeight = 0,
hooks = { hooks = {
processOptions: [], processOptions: [],
...@@ -2327,10 +2327,10 @@ Licensed under the MIT license. ...@@ -2327,10 +2327,10 @@ Licensed under the MIT license.
bc = options.grid.borderColor; bc = options.grid.borderColor;
if (typeof bw === "object" || typeof bc === "object") { if (typeof bw === "object" || typeof bc === "object") {
if (typeof bw !== "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") { 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) { if (bw.top > 0) {
...@@ -3164,7 +3164,7 @@ Licensed under the MIT license. ...@@ -3164,7 +3164,7 @@ Licensed under the MIT license.
if (options.legend.container != null) { if (options.legend.container != null) {
$(options.legend.container).html(table); $(options.legend.container).html(table);
} else { } else {
var pos = {"position": "absolute"}, var pos = { "position": "absolute" },
p = options.legend.position, p = options.legend.position,
m = options.legend.margin; m = options.legend.margin;
if (m[0] == null) { if (m[0] == null) {
......
...@@ -565,7 +565,7 @@ More detail and specific examples can be found in the included HTML file. ...@@ -565,7 +565,7 @@ More detail and specific examples can be found in the included HTML file.
//-- Additional Interactive related functions -- //-- Additional Interactive related functions --
function isPointInPoly(poly, pt) { 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[i][1] <= pt[1] && pt[1] < poly[j][1]) ||
(poly[j][1] <= pt[1] && pt[1] < poly[i][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]) && (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: ...@@ -82,8 +82,8 @@ The plugin allso adds the following methods to the plot object:
function init(plot) { function init(plot) {
var selection = { var selection = {
first: { x: -1, y: -1}, first: { x: -1, y: -1 },
second: { x: -1, y: -1}, second: { x: -1, y: -1 },
show: false, show: false,
active: false, active: false,
touch: false touch: false
......
...@@ -145,7 +145,7 @@ You may need to check for this in hover events. ...@@ -145,7 +145,7 @@ You may need to check for this in hover events.
var color = s.threshold.color ? s.threshold.color : "black"; var color = s.threshold.color ? s.threshold.color : "black";
$(".legendLabel").each(function() { $(".legendLabel").each(function() {
if($(this).text() === s.label) if ($(this).text() === s.label)
{ {
var legend = $(this).prev().find("div > div"); var legend = $(this).prev().find("div > div");
legend.css("border-right-color", color); 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