Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1658829

Browse filesBrowse files
committed
sankey tooltip calc relative to div.svg-container rather than gd
1 parent 2cc7804 commit 1658829
Copy full SHA for 1658829

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎src/traces/sankey/plot.js

Copy file name to clipboardExpand all lines: src/traces/sankey/plot.js
+2-2Lines changed: 2 additions & 2 deletions
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 = gd._fullLayout._paperdiv.node().getBoundingClientRect();
139139
var boundingBox = element.getBoundingClientRect();
140140
var hoverCenterX = boundingBox.left + boundingBox.width / 2;
141141
var hoverCenterY = boundingBox.top + boundingBox.height / 2;
@@ -193,7 +193,7 @@ module.exports = function plot(gd, calcData) {
193193
var nodeHoverFollow = function(element, d) {
194194
var trace = d.node.trace;
195195
var nodeRect = d3.select(element).select('.nodeRect');
196-
var rootBBox = gd.getBoundingClientRect();
196+
var rootBBox = gd._fullLayout._paperdiv.node().getBoundingClientRect();
197197
var boundingBox = nodeRect.node().getBoundingClientRect();
198198
var hoverCenterX0 = boundingBox.left - 2 - rootBBox.left;
199199
var hoverCenterX1 = boundingBox.right + 2 - rootBBox.left;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.