Skip to content

Commit b4e6aa2

Browse files
committed
sankey tooltip calc relative to div.svg-container rather than gd
1 parent 2cc7804 commit b4e6aa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/sankey/plot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ module.exports = function plot(gd, calcData) {
135135

136136
var linkHoverFollow = function(element, d) {
137137
var trace = d.link.trace;
138-
var rootBBox = gd.getBoundingClientRect();
138+
var rootBBox = d3.select(gd).select('.svg-container').node().getBoundingClientRect();
139139
var boundingBox = element.getBoundingClientRect();
140140
var hoverCenterX = boundingBox.left + boundingBox.width / 2;
141141
var hoverCenterY = boundingBox.top + boundingBox.height / 2;

0 commit comments

Comments
 (0)