Skip to content

Commit bd6688e

Browse files
committed
interactive test
1 parent 17dbadd commit bd6688e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/components/fx/hover.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,15 @@ function _hover(gd, evt, subplot, noHoverEvent) {
769769
y0: y0 + gTop,
770770
y1: y1 + gTop
771771
};
772+
773+
d3.select('.hover-bbox')
774+
.attr('x', x0)
775+
.attr('y', y0)
776+
.attr('width', Math.max(4, x1 - x0))
777+
.attr('height', Math.max(4, y1 - y0))
778+
.attr('stroke', 'black')
779+
.attr('fill', 'lightgray')
780+
.attr('opacity', '0.5');
772781
}
773782

774783
pt.eventData = [eventData];

src/plot_api/plot_api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3772,6 +3772,8 @@ function makePlotFramework(gd) {
37723772
fullLayout._zoomlayer = fullLayout._toppaper.append('g').classed('zoomlayer', true);
37733773
fullLayout._hoverlayer = fullLayout._hoverpaper.append('g').classed('hoverlayer', true);
37743774

3775+
fullLayout._hoverpaper.append('svg').append('rect').classed('hover-bbox', true);
3776+
37753777
// Make the modebar container
37763778
fullLayout._modebardiv
37773779
.classed('modebar-container', true)

0 commit comments

Comments
 (0)