From d60f0d47bb08b94fc3110048cde04895d7eae91f Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Fri, 13 May 2011 13:19:10 +0200 Subject: [PATCH] Previous commit missed some changes, oops --- NEWS.txt | 8 +++++++- jquery.flot.js | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 3f57858..434e749 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -17,6 +17,9 @@ Changes: - Canvas text support for labels (sponsored by YCharts.com). +- Support for setting the interval between redraws of the overlay + canvas with redrawOverlayInterval (suggested in issue 185). + Bug fixes - Fix problem with null values and pie plugin (patch by gcruxifix, @@ -25,7 +28,10 @@ Bug fixes kaarlenkaski, issue 348). - Fix axis box calculations so the boxes include the outermost part of the labels too. - +- Fix problem with event clicking and hovering in IE 8 by updating + Excanvas and removing previous work-around (test case by Ara + Anjargolian). + Flot 0.7 -------- diff --git a/jquery.flot.js b/jquery.flot.js index 53ecce3..ffaa859 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -135,6 +135,9 @@ autoHighlight: true, // highlight in case mouse is near mouseActiveRadius: 10 // how far the mouse can be away to activate an item }, + interaction: { + redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow + }, hooks: {} }, canvas = null, // the canvas for the plot itself @@ -2432,8 +2435,14 @@ } function triggerRedrawOverlay() { + var t = options.interaction.redrawOverlayInterval; + if (t == -1) { // skip event queue + drawOverlay(); + return; + } + if (!redrawTimeout) - redrawTimeout = setTimeout(drawOverlay, 1000/60); + redrawTimeout = setTimeout(drawOverlay, t); } function drawOverlay() {