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
This commit is contained in:
Matthias Schiffer 2016-02-26 05:34:23 +01:00
parent a155149601
commit 48c7039d53

View File

@ -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)