Round the computed colors a bit to reduce flickering.

(each color change requires regenerating the svg icon)
This commit is contained in:
Oliver Jowett 2016-07-02 17:11:08 +01:00
parent 18bd8b630d
commit 90f5a7d4e3

View file

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