Browse Source

Fix heatmap colors for Chrome/Safari (#5421)

for-closed-social
Lauris BH 5 years ago
committed by GitHub
parent
commit
f17524bd0c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      public/js/index.js

+ 6
- 1
public/js/index.js View File

@ -2363,8 +2363,13 @@ function initHeatmap(appElementId, heatmapUser, locale) {
getColor: function(idx) {
var el = document.createElement('div');
el.className = 'heatmap-color-' + idx;
document.body.appendChild(el);
return getComputedStyle(el).backgroundColor;
var color = getComputedStyle(el).backgroundColor;
document.body.removeChild(el);
return color;
}
},

Loading…
Cancel
Save