Run pre-commit on legacy code
This commit is contained in:
parent
fea11ac752
commit
83b7e4162e
323 changed files with 6126 additions and 6462 deletions
|
@ -9,7 +9,7 @@ website:
|
|||
Take a look at the examples linked from above, they should give a good
|
||||
impression of what Flot can do and the source code of the examples is
|
||||
probably the fastest way to learn how to use Flot.
|
||||
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
|
|
@ -61,7 +61,7 @@ The plugin also adds four public methods:
|
|||
lineWidth: 1
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function init(plot) {
|
||||
// position of crosshair in pixels
|
||||
var crosshair = { x: -1, y: -1, locked: false };
|
||||
|
@ -74,12 +74,12 @@ The plugin also adds four public methods:
|
|||
crosshair.x = Math.max(0, Math.min(o.left, plot.width()));
|
||||
crosshair.y = Math.max(0, Math.min(o.top, plot.height()));
|
||||
}
|
||||
|
||||
|
||||
plot.triggerRedrawOverlay();
|
||||
};
|
||||
|
||||
|
||||
plot.clearCrosshair = plot.setCrosshair; // passes null for pos
|
||||
|
||||
|
||||
plot.lockCrosshair = function lockCrosshair(pos) {
|
||||
if (pos)
|
||||
plot.setCrosshair(pos);
|
||||
|
@ -103,18 +103,18 @@ The plugin also adds four public methods:
|
|||
function onMouseMove(e) {
|
||||
if (crosshair.locked)
|
||||
return;
|
||||
|
||||
|
||||
if (plot.getSelection && plot.getSelection()) {
|
||||
crosshair.x = -1; // hide the crosshair while selecting
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var offset = plot.offset();
|
||||
crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
|
||||
crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));
|
||||
plot.triggerRedrawOverlay();
|
||||
}
|
||||
|
||||
|
||||
plot.hooks.bindEvents.push(function (plot, eventHolder) {
|
||||
if (!plot.getOptions().crosshair.mode)
|
||||
return;
|
||||
|
@ -129,7 +129,7 @@ The plugin also adds four public methods:
|
|||
return;
|
||||
|
||||
var plotOffset = plot.getPlotOffset();
|
||||
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(plotOffset.left, plotOffset.top);
|
||||
|
||||
|
@ -157,7 +157,7 @@ The plugin also adds four public methods:
|
|||
eventHolder.unbind("mousemove", onMouseMove);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -11,10 +11,10 @@ plots, you can just fix the size of their placeholders.
|
|||
*/
|
||||
|
||||
|
||||
/* Inline dependency:
|
||||
/* Inline dependency:
|
||||
* jQuery resize event - v1.1 - 3/14/2010
|
||||
* http://benalman.com/projects/jquery-resize-plugin/
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
|
@ -38,7 +38,7 @@ plots, you can just fix the size of their placeholders.
|
|||
plot.setupGrid();
|
||||
plot.draw();
|
||||
}
|
||||
|
||||
|
||||
function bindEvents(plot, eventHolder) {
|
||||
plot.getPlaceholder().resize(onResize);
|
||||
}
|
||||
|
@ -46,11 +46,11 @@ plots, you can just fix the size of their placeholders.
|
|||
function shutdown(plot, eventHolder) {
|
||||
plot.getPlaceholder().unbind("resize", onResize);
|
||||
}
|
||||
|
||||
|
||||
plot.hooks.bindEvents.push(bindEvents);
|
||||
plot.hooks.shutdown.push(shutdown);
|
||||
}
|
||||
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue