Skip to content

Commit 26f1568

Browse files
committed
remove tooltip when clicking link
also clean up console logs
1 parent e2bb6e4 commit 26f1568

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/matrix.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,8 @@ function createViz(elem, id, height, rowNames, colNames, matrix, options, theme)
116116

117117
//to center the tooltip appropriately we need to find the rendered width of both the
118118
//the box they hovered and of the tooltip with the text in it.
119-
var rect = event.target.getBoundingClientRect();
119+
// var rect = event.target.getBoundingClientRect();
120120
var divSize = tooltip.node().getBoundingClientRect();
121-
console.log(event);
122-
// console.log(divSize);
123121

124122
// tooltip for label
125123
tooltip
@@ -231,6 +229,12 @@ function createViz(elem, id, height, rowNames, colNames, matrix, options, theme)
231229
.attr('width', x.bandwidth())
232230
.attr('height', y.bandwidth());
233231
tooltip.style('opacity', 0).style('left', '0px').style('top', '0px');
232+
})
233+
.on('click', function (d) {
234+
if(linkURL) {
235+
// d3.select(this).remove();
236+
tooltip.remove();
237+
}
234238
});
235239
}
236240

0 commit comments

Comments
 (0)