From 88bdc981088faeba82adb888c4472bfc59c29d96 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 26 Feb 2016 05:34:23 +0100 Subject: [PATCH] gluon-status-page: don't reset signal graphs on resize events if width hasn't changed Mobile browsers will often show or hide the address bar while scrolling. This causes resize events which would often reset the signal graphs. Fixes #662 --- package/gluon-status-page/src/js/lib/gui/signalgraph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gluon-status-page/src/js/lib/gui/signalgraph.js b/package/gluon-status-page/src/js/lib/gui/signalgraph.js index 83732158..231ce628 100644 --- a/package/gluon-status-page/src/js/lib/gui/signalgraph.js +++ b/package/gluon-status-page/src/js/lib/gui/signalgraph.js @@ -110,7 +110,7 @@ define(function () { function resize() { var newWidth = canvas.parentNode.clientWidth - if (newWidth === 0) + if (newWidth === 0 || newWidth === canvas.width) return var lastImage = ctx.getImageData(0, 0, newWidth, canvas.height)