From 90f5a7d4e3216aad6753f64a727a2ee64cb65c31 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Sat, 2 Jul 2016 17:11:08 +0100 Subject: [PATCH] Round the computed colors a bit to reduce flickering. (each color change requires regenerating the svg icon) --- public_html/planeObject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 7493ce6..92b0f9b 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -262,7 +262,7 @@ PlaneObject.prototype.getMarkerColor = function() { if (l < 5) l = 5; else if (l > 95) l = 95; - return 'hsl(' + h.toFixed(0) + ',' + s.toFixed(0) + '%,' + l.toFixed(0) + '%)' + return 'hsl(' + (h/5).toFixed(0)*5 + ',' + (s/5).toFixed(0)*5 + '%,' + (l/5).toFixed(0)*5 + '%)' } PlaneObject.prototype.updateIcon = function() {