From f39c71fbc71fdba4367159768ebfccd9e9d34e9f Mon Sep 17 00:00:00 2001 From: David Schnur Date: Tue, 28 May 2013 22:10:13 -0400 Subject: [PATCH] Remove unused variable definitions. --- jquery.flot.crosshair.js | 2 +- jquery.flot.js | 16 ++++++++-------- jquery.flot.pie.js | 2 +- jquery.flot.resize.js | 4 ++-- jquery.flot.selection.js | 2 +- jquery.flot.symbol.js | 8 ++++---- jquery.flot.time.js | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/jquery.flot.crosshair.js b/jquery.flot.crosshair.js index ee71ca1..53b0f54 100644 --- a/jquery.flot.crosshair.js +++ b/jquery.flot.crosshair.js @@ -96,7 +96,7 @@ The plugin also adds four public methods: crosshair.locked = false; }; - function onMouseOut(e) { + function onMouseOut() { if (crosshair.locked) { return; } diff --git a/jquery.flot.js b/jquery.flot.js index c7dfa63..bc35340 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -636,7 +636,7 @@ Licensed under the MIT license. }; plot.getData = function () { return series; }; plot.getAxes = function () { - var res = {}, i; + var res = {}; $.each(xaxes.concat(yaxes), function (_, axis) { if (axis) { res[axis.direction + (axis.n !== 1 ? axis.n : "") + "axis"] = axis; @@ -1069,8 +1069,8 @@ Licensed under the MIT license. var topSentry = Number.POSITIVE_INFINITY, bottomSentry = Number.NEGATIVE_INFINITY, fakeInfinity = Number.MAX_VALUE, - i, j, k, m, length, - s, points, ps, x, y, axis, val, f, p, + i, j, k, m, + s, points, ps, val, f, p, data, format; function updateAxis(axis, min, max) { @@ -1443,7 +1443,7 @@ Licensed under the MIT license. axisMargin = options.grid.axisMargin, padding = options.grid.labelMargin, all = axis.direction === "x" ? xaxes : yaxes, - index, innermost; + innermost; // determine axis margin var samePosition = $.grep(all, function (a) { @@ -1518,7 +1518,7 @@ Licensed under the MIT license. // inside the canvas and isn't clipped off var minMargin = options.grid.minBorderMargin, - margins = { x: 0, y: 0 }, i, axis; + margins = { x: 0, y: 0 }, i; // check stuff from the plot (FIXME: this should just read // a value from the series, otherwise it's impossible to @@ -2332,7 +2332,7 @@ Licensed under the MIT license. var points = datapoints.points, ps = datapoints.pointsize, bottom = Math.min(Math.max(0, axisy.min), axisy.max), - i = 0, top, areaOpen = false, + i = 0, areaOpen = false, ypos = 1, segmentStart = 0, segmentEnd = 0; // we process each segment in two turns, first forward @@ -2864,7 +2864,7 @@ Licensed under the MIT license. function findNearbyItem(mouseX, mouseY, seriesFilter) { var maxDistance = options.grid.mouseActiveRadius, smallestDistance = maxDistance * maxDistance + 1, - item = null, foundPoint = false, i, j, ps; + item = null, i, j, ps; for (i = series.length - 1; i >= 0; --i) { if (!seriesFilter(series[i])) { @@ -2965,7 +2965,7 @@ Licensed under the MIT license. function onMouseLeave(e) { if (options.grid.hoverable) { triggerClickHoverEvent("plothover", e, - function (s) { return false; }); + function () { return false; }); } } diff --git a/jquery.flot.pie.js b/jquery.flot.pie.js index 33c33f6..4ba2b27 100644 --- a/jquery.flot.pie.js +++ b/jquery.flot.pie.js @@ -149,7 +149,7 @@ More detail and specific examples can be found in the included HTML file. } }); - function processDatapoints(plot, series, datapoints) { + function processDatapoints(plot) { if (!processed) { processed = true; canvas = plot.getCanvas(); diff --git a/jquery.flot.resize.js b/jquery.flot.resize.js index 9716ac1..17fe0f8 100644 --- a/jquery.flot.resize.js +++ b/jquery.flot.resize.js @@ -40,11 +40,11 @@ can just fix the size of their placeholders. plot.draw(); } - function bindEvents(plot, eventHolder) { + function bindEvents(plot) { plot.getPlaceholder().resize(onResize); } - function shutdown(plot, eventHolder) { + function shutdown(plot) { plot.getPlaceholder().unbind("resize", onResize); } diff --git a/jquery.flot.selection.js b/jquery.flot.selection.js index 10730f5..1d89ace 100644 --- a/jquery.flot.selection.js +++ b/jquery.flot.selection.js @@ -269,7 +269,7 @@ The plugin allso adds the following methods to the plot object: } function setSelection(ranges, preventEvent) { - var axis, range, o = plot.getOptions(); + var range, o = plot.getOptions(); if (o.selection.mode === "y") { selection.first.x = 0; diff --git a/jquery.flot.symbol.js b/jquery.flot.symbol.js index acd9305..29ed7d2 100644 --- a/jquery.flot.symbol.js +++ b/jquery.flot.symbol.js @@ -14,17 +14,17 @@ The symbols are accessed as strings through the standard symbol options: */ (function ($) { - function processRawData(plot, series, datapoints) { + function processRawData(plot, series) { // we normalize the area of each symbol so it is approximately the // same as a circle of the given radius var handlers = { - square: function (ctx, x, y, radius, shadow) { + square: function (ctx, x, y, radius) { // pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2 var size = radius * Math.sqrt(Math.PI) / 2; ctx.rect(x - size, y - size, size + size, size + size); }, - diamond: function (ctx, x, y, radius, shadow) { + diamond: function (ctx, x, y, radius) { // pi * r^2 = 2s^2 => s = r * sqrt(pi/2) var size = radius * Math.sqrt(Math.PI / 2); ctx.moveTo(x - size, y); @@ -44,7 +44,7 @@ The symbols are accessed as strings through the standard symbol options: ctx.lineTo(x - size/2, y + height/2); } }, - cross: function (ctx, x, y, radius, shadow) { + cross: function (ctx, x, y, radius) { // pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2 var size = radius * Math.sqrt(Math.PI) / 2; ctx.moveTo(x - size, y - size); diff --git a/jquery.flot.time.js b/jquery.flot.time.js index 3ace573..2945c56 100644 --- a/jquery.flot.time.js +++ b/jquery.flot.time.js @@ -195,7 +195,7 @@ API.txt for details. [1, "year"]]); function init(plot) { - plot.hooks.processOptions.push(function (plot, options) { + plot.hooks.processOptions.push(function (plot) { $.each(plot.getAxes(), function(axisName, axis) { var opts = axis.options;