|
|
|
|
@ -101,7 +101,7 @@ The plugin allso adds the following methods to the plot object:
|
|
|
|
|
function onMouseMove(e) {
|
|
|
|
|
if (selection.active) {
|
|
|
|
|
updateSelection(e);
|
|
|
|
|
plot.getPlaceholder().trigger("plotselecting", [ getSelection() ]);
|
|
|
|
|
plot.getPlaceholder().trigger("plotselecting", [getSelection()]);
|
|
|
|
|
|
|
|
|
|
// prevent the default action if it is a 'touch' action
|
|
|
|
|
if (selection.touch === true) {
|
|
|
|
|
@ -161,8 +161,8 @@ The plugin allso adds the following methods to the plot object:
|
|
|
|
|
triggerSelectedEvent();
|
|
|
|
|
} else {
|
|
|
|
|
// this counts as a clear
|
|
|
|
|
plot.getPlaceholder().trigger("plotunselected", [ ]);
|
|
|
|
|
plot.getPlaceholder().trigger("plotselecting", [ null ]);
|
|
|
|
|
plot.getPlaceholder().trigger("plotunselected", []);
|
|
|
|
|
plot.getPlaceholder().trigger("plotselecting", [null]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
selection.touch = false;
|
|
|
|
|
@ -192,11 +192,11 @@ The plugin allso adds the following methods to the plot object:
|
|
|
|
|
function triggerSelectedEvent() {
|
|
|
|
|
var r = getSelection();
|
|
|
|
|
|
|
|
|
|
plot.getPlaceholder().trigger("plotselected", [ r ]);
|
|
|
|
|
plot.getPlaceholder().trigger("plotselected", [r]);
|
|
|
|
|
|
|
|
|
|
// backwards-compat stuff, to be removed in future
|
|
|
|
|
if (r.xaxis && r.yaxis) {
|
|
|
|
|
plot.getPlaceholder().trigger("selected", [ { x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to } ]);
|
|
|
|
|
plot.getPlaceholder().trigger("selected", [{ x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to }]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|