Skip to content

Commit d9c34fb

Browse files
committed
display hoverlabels above modebar
1 parent 4877a9c commit d9c34fb

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

build/plotcss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var rules = {
3131
"X .cursor-n-resize": "cursor:n-resize;",
3232
"X .cursor-ne-resize": "cursor:ne-resize;",
3333
"X .cursor-grab": "cursor:-webkit-grab;cursor:grab;",
34-
"X .modebar": "position:absolute;top:2px;right:2px;z-index:1001;",
34+
"X .modebar": "position:absolute;top:2px;right:2px;",
3535
"X .ease-bg": "-webkit-transition:background-color 0.3s ease 0s;-moz-transition:background-color 0.3s ease 0s;-ms-transition:background-color 0.3s ease 0s;-o-transition:background-color 0.3s ease 0s;transition:background-color 0.3s ease 0s;",
3636
"X .modebar--hover>:not(.watermark)": "opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;",
3737
"X:hover .modebar--hover .modebar-group": "opacity:1;",

src/css/_modebar.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
position: absolute;
33
top: 2px;
44
right: 2px;
5-
z-index: 1001;
65
}
76

87
.ease-bg {

src/plot_api/plot_api.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3805,6 +3805,11 @@ function makePlotFramework(gd) {
38053805
fullLayout._toppaper = fullLayout._paperdiv.append('svg')
38063806
.classed('main-svg', true);
38073807

3808+
fullLayout._modebardiv = fullLayout._paperdiv.append('div');
3809+
3810+
fullLayout._hoverpaper = fullLayout._paperdiv.append('svg')
3811+
.classed('main-svg', true);
3812+
38083813
if(!fullLayout._uid) {
38093814
var otherUids = {};
38103815
d3.selectAll('defs').each(function() {
@@ -3881,11 +3886,10 @@ function makePlotFramework(gd) {
38813886
fullLayout._infolayer = fullLayout._toppaper.append('g').classed('infolayer', true);
38823887
fullLayout._menulayer = fullLayout._toppaper.append('g').classed('menulayer', true);
38833888
fullLayout._zoomlayer = fullLayout._toppaper.append('g').classed('zoomlayer', true);
3884-
fullLayout._hoverlayer = fullLayout._toppaper.append('g').classed('hoverlayer', true);
3889+
fullLayout._hoverlayer = fullLayout._hoverpaper.append('g').classed('hoverlayer', true);
38853890

38863891
// Make the modebar container
3887-
fullLayout._modebardiv = fullLayout._paperdiv.selectAll('.modebar-container').data([0]);
3888-
fullLayout._modebardiv.enter().append('div')
3892+
fullLayout._modebardiv
38893893
.classed('modebar-container', true)
38903894
.style('position', 'absolute')
38913895
.style('top', '0px')

0 commit comments

Comments
 (0)