From b9066cad05dec50b8719ef1f63cd168adeb9f66a Mon Sep 17 00:00:00 2001 From: haytjes Date: Mon, 27 Jan 2014 18:58:38 +0100 Subject: [PATCH] Workaround for Firefox on android Firefox on android has a bug related to canvas.clearRect. As a result the graphs aren't visible. This works around this issue --- website/frontpage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/frontpage.js b/website/frontpage.js index 5bddae1..86dc799 100644 --- a/website/frontpage.js +++ b/website/frontpage.js @@ -251,8 +251,9 @@ Display.prototype.draw = function () { var axis = plot.getAxes(); var rx = Math.round(axis.xaxis.c2p(x)); if (this.graph.timelist[rx] < this.graph.earliest) { - ctx.strokeRect(x - radius / 2, y - radius / 2, radius, radius); - ctx.clearRect(x - radius / 4, y - radius / 4, radius / 2, radius / 2); + ctx.strokeRect(x - radius / 3, y - radius / 3, radius * 2/3, radius * 2/3); + // Disable clearRect due to bug in Firefox for Android (bug 936177) + //ctx.clearRect(x - radius / 4, y - radius / 4, radius / 2, radius / 2); } else { ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false); }