Skip to content

Commit

Permalink
js/CGP: Disable page refesh when scrolling or zooming a graph
Browse files Browse the repository at this point in the history
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;

<meta http-equiv="refresh" content="{$CONFIG['page_refresh']}">

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.
  • Loading branch information
alanswanson committed Feb 19, 2021
1 parent fd8fa70 commit f1c36ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/CGP.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var CGP = (function() {
} catch (ex) {
console.error('mouse_move:', ex, ex.stack);
}
window.stop();
}
};
var mouse_up = function(e) {
Expand Down Expand Up @@ -55,6 +56,7 @@ var CGP = (function() {
} catch (ex) {
console.error('mouse_scroll:', ex, ex.stack);
}
window.stop();
}

if (e.stopPropagation)
Expand Down

0 comments on commit f1c36ce

Please sign in to comment.