Skip to content

Commit

Permalink
Use getBoundingClientRect to get header height
Browse files Browse the repository at this point in the history
  • Loading branch information
vera-liu committed Oct 25, 2016
1 parent 91a60f0 commit 0b147f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caravel/assets/visualizations/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function heatmapVis(slice) {
function refresh() {
// Header for panel in explore v2
const header = document.getElementsByClassName('panel-title');
const headerHeight = header ? header[0].offsetHeight : 0;
const headerHeight = header ? header[0].getBoundingClientRect().height : 0;
const margin = {
top: 20 + headerHeight,
right: 10,
Expand Down

0 comments on commit 0b147f7

Please sign in to comment.