Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit acc9630

Browse files
committed
grab ref to x/y axis using Axes.getFromId instead of _plots
- looks like fullLayout._plots does not get updated properly on resize. Fixing that deserves a PR of its own. - this commit reverts to the pre-plotly#575 behavior
1 parent 2c7c2db commit acc9630

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/plots/cartesian/graph_interact.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,13 @@ function hover(gd, evt, subplot) {
337337
// 'cartesian' case
338338
var plotObj = plots[spId];
339339
if(plotObj) {
340-
xaArray[i] = plotObj.xaxis;
341-
yaArray[i] = plotObj.yaxis;
340+
341+
// TODO make sure that fullLayout_plots axis refs
342+
// get updated properly so that we don't have
343+
// to use Axes.getFromId in general.
344+
345+
xaArray[i] = Axes.getFromId(gd, plotObj.xaxis._id);
346+
yaArray[i] = Axes.getFromId(gd, plotObj.yaxis._id);
342347
continue;
343348
}
344349

0 commit comments

Comments
 (0)