From e131b7761813b80aba708293f368caed8cc337d6 Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Mon, 12 Apr 2010 12:57:28 +0000 Subject: [PATCH] Check the selection passed into setSelection in the selection plugin, to guard against errors when synchronizing plots (fix by Lau Bech Lauritzen). git-svn-id: https://flot.googlecode.com/svn/trunk@246 1e0a6537-2640-0410-bfb7-f154510ff394 --- NEWS.txt | 3 +++ jquery.flot.selection.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.txt b/NEWS.txt index 5f1e501..38ed81a 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -39,6 +39,9 @@ Bug fixes: (problem reported by Morgan). - Fixed problem with turning off bar outline (issue 253, fix by Jordi Castells). +- Check the selection passed into setSelection in the selection + plugin, to guard against errors when synchronizing plots (fix by Lau + Bech Lauritzen). Flot 0.6 -------- diff --git a/jquery.flot.selection.js b/jquery.flot.selection.js index da81c92..8cf8296 100644 --- a/jquery.flot.selection.js +++ b/jquery.flot.selection.js @@ -232,7 +232,7 @@ The plugin allso adds the following methods to the plot object: selection.show = true; plot.triggerRedrawOverlay(); - if (!preventEvent) + if (!preventEvent && selectionIsSane()) triggerSelectedEvent(); }