Commit f39c71fb authored by David Schnur's avatar David Schnur

Remove unused variable definitions.

parent 9fc03e53
......@@ -96,7 +96,7 @@ The plugin also adds four public methods:
crosshair.locked = false;
};
function onMouseOut(e) {
function onMouseOut() {
if (crosshair.locked) {
return;
}
......
......@@ -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; });
}
}
......
......@@ -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();
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
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