File tree 4 files changed +11
-8
lines changed
4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ var rules = {
31
31
"X .cursor-n-resize" : "cursor:n-resize;" ,
32
32
"X .cursor-ne-resize" : "cursor:ne-resize;" ,
33
33
"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;" ,
35
35
"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;" ,
36
36
"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;" ,
37
37
"X:hover .modebar--hover .modebar-group" : "opacity:1;" ,
Original file line number Diff line number Diff line change 2
2
position : absolute ;
3
3
top : 2px ;
4
4
right : 2px ;
5
- z-index : 1001 ;
6
5
}
7
6
8
7
.ease-bg {
Original file line number Diff line number Diff line change @@ -3808,6 +3808,11 @@ function makePlotFramework(gd) {
3808
3808
fullLayout . _toppaper = fullLayout . _paperdiv . append ( 'svg' )
3809
3809
. classed ( 'main-svg' , true ) ;
3810
3810
3811
+ fullLayout . _modebardiv = fullLayout . _paperdiv . append ( 'div' ) ;
3812
+
3813
+ fullLayout . _hoverpaper = fullLayout . _paperdiv . append ( 'svg' )
3814
+ . classed ( 'main-svg' , true ) ;
3815
+
3811
3816
if ( ! fullLayout . _uid ) {
3812
3817
var otherUids = { } ;
3813
3818
d3 . selectAll ( 'defs' ) . each ( function ( ) {
@@ -3884,11 +3889,10 @@ function makePlotFramework(gd) {
3884
3889
fullLayout . _infolayer = fullLayout . _toppaper . append ( 'g' ) . classed ( 'infolayer' , true ) ;
3885
3890
fullLayout . _menulayer = fullLayout . _toppaper . append ( 'g' ) . classed ( 'menulayer' , true ) ;
3886
3891
fullLayout . _zoomlayer = fullLayout . _toppaper . append ( 'g' ) . classed ( 'zoomlayer' , true ) ;
3887
- fullLayout . _hoverlayer = fullLayout . _toppaper . append ( 'g' ) . classed ( 'hoverlayer' , true ) ;
3892
+ fullLayout . _hoverlayer = fullLayout . _hoverpaper . append ( 'g' ) . classed ( 'hoverlayer' , true ) ;
3888
3893
3889
3894
// Make the modebar container
3890
- fullLayout . _modebardiv = fullLayout . _paperdiv . selectAll ( '.modebar-container' ) . data ( [ 0 ] ) ;
3891
- fullLayout . _modebardiv . enter ( ) . append ( 'div' )
3895
+ fullLayout . _modebardiv
3892
3896
. classed ( 'modebar-container' , true )
3893
3897
. style ( 'position' , 'absolute' )
3894
3898
. style ( 'top' , '0px' )
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ describe('Test Plots', function() {
329
329
330
330
it ( 'should resize the main svgs' , function ( ) {
331
331
var mainSvgs = document . getElementsByClassName ( 'main-svg' ) ;
332
- expect ( mainSvgs . length ) . toBe ( 2 ) ;
332
+ expect ( mainSvgs . length ) . toBe ( 3 ) ;
333
333
334
334
for ( var i = 0 ; i < mainSvgs . length ; i ++ ) {
335
335
var svg = mainSvgs [ i ] ;
@@ -343,7 +343,7 @@ describe('Test Plots', function() {
343
343
344
344
it ( 'should update the axis scales' , function ( ) {
345
345
var mainSvgs = document . getElementsByClassName ( 'main-svg' ) ;
346
- expect ( mainSvgs . length ) . toBe ( 2 ) ;
346
+ expect ( mainSvgs . length ) . toBe ( 3 ) ;
347
347
348
348
var fullLayout = gd . _fullLayout ;
349
349
var plotinfo = fullLayout . _plots . xy ;
@@ -357,7 +357,7 @@ describe('Test Plots', function() {
357
357
358
358
it ( 'should allow resizing by plot ID' , function ( done ) {
359
359
var mainSvgs = document . getElementsByClassName ( 'main-svg' ) ;
360
- expect ( mainSvgs . length ) . toBe ( 2 ) ;
360
+ expect ( mainSvgs . length ) . toBe ( 3 ) ;
361
361
362
362
expect ( typeof gd . id ) . toBe ( 'string' ) ;
363
363
expect ( gd . id ) . toBeTruthy ( ) ;
You can’t perform that action at this time.
0 commit comments