flot
Advanced tools
Comparing version 3.2.10 to 3.2.11
{ | ||
"name": "flot", | ||
"version": "3.2.10", | ||
"version": "3.2.11", | ||
"main": "dist/es5/jquery.flot.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -107,5 +107,3 @@ /* Flot plugin for selecting regions of a plot. | ||
var mouseUpHandler = null; | ||
function onMouseMove(e) { | ||
function onDrag(e) { | ||
if (selection.active) { | ||
@@ -118,3 +116,3 @@ updateSelection(e); | ||
function onMouseDown(e) { | ||
function onDragStart(e) { | ||
var o = plot.getOptions(); | ||
@@ -143,11 +141,5 @@ // only accept left-click | ||
selection.active = true; | ||
// this is a bit silly, but we have to use a closure to be | ||
// able to whack the same handler again | ||
mouseUpHandler = function (e) { onMouseUp(e); }; | ||
$(document).one("mouseup", mouseUpHandler); | ||
} | ||
function onMouseUp(e) { | ||
function onDragEnd(e) { | ||
mouseUpHandler = null; | ||
@@ -366,4 +358,5 @@ | ||
if (o.selection.mode != null) { | ||
eventHolder.mousemove(onMouseMove); | ||
eventHolder.mousedown(onMouseDown); | ||
plot.addEventHandler("dragstart", onDragStart, eventHolder, 0); | ||
plot.addEventHandler("drag", onDrag, eventHolder, 0); | ||
plot.addEventHandler("dragend", onDragEnd, eventHolder, 0); | ||
} | ||
@@ -510,8 +503,5 @@ }); | ||
plot.hooks.shutdown.push(function (plot, eventHolder) { | ||
eventHolder.unbind("mousemove", onMouseMove); | ||
eventHolder.unbind("mousedown", onMouseDown); | ||
if (mouseUpHandler) { | ||
$(document).unbind("mouseup", mouseUpHandler); | ||
} | ||
eventHolder.unbind("dragstart", onDragStart); | ||
eventHolder.unbind("drag", onDrag); | ||
eventHolder.unbind("dragend", onDragEnd); | ||
}); | ||
@@ -518,0 +508,0 @@ } |
Sorry, the diff of this file is too big to display
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
983378
19489