From f1c36cee890752fff219c321596ca0300519a5ee Mon Sep 17 00:00:00 2001 From: Alan Swanson Date: Fri, 19 Feb 2021 18:47:06 +0000 Subject: [PATCH] js/CGP: Disable page refesh when scrolling or zooming a graph When scrolling or zooming a graph we want to disable the page refresh because we are trying to look at the detail. Unfortunately Javascript cannot override the refresh meta tag; Except with a window.stop() which is brutal but since the complete RRD data has already been read this is not an issue. See issue #139 suggesting submitting a PR to refresh RRD data whilst a graph is scrolled or zoomed. --- js/CGP.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/CGP.js b/js/CGP.js index d726533..f9cd7cd 100644 --- a/js/CGP.js +++ b/js/CGP.js @@ -20,6 +20,7 @@ var CGP = (function() { } catch (ex) { console.error('mouse_move:', ex, ex.stack); } + window.stop(); } }; var mouse_up = function(e) { @@ -55,6 +56,7 @@ var CGP = (function() { } catch (ex) { console.error('mouse_scroll:', ex, ex.stack); } + window.stop(); } if (e.stopPropagation)