Skip to content
Snippets Groups Projects
Commit 88bdc981 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

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
parent 89b3dca8
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,7 @@ define(function () { ...@@ -110,7 +110,7 @@ define(function () {
function resize() { function resize() {
var newWidth = canvas.parentNode.clientWidth var newWidth = canvas.parentNode.clientWidth
if (newWidth === 0) if (newWidth === 0 || newWidth === canvas.width)
return return
var lastImage = ctx.getImageData(0, 0, newWidth, canvas.height) var lastImage = ctx.getImageData(0, 0, newWidth, canvas.height)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment