@@ -857,14 +857,13 @@ describe('Test gl2d plots', function() {
857
857
858
858
it ( 'should respond to drag interactions' , function ( done ) {
859
859
var _mock = Lib . extendDeep ( { } , mock ) ;
860
- _mock . data [ 0 ] . type = 'scatter' ;
861
860
862
861
var relayoutCallback = jasmine . createSpy ( 'relayoutCallback' ) ;
863
862
864
- var originalX = [ - 0.3169014084507042 , 5.316901408450704 ] ;
865
- var originalY = [ - 0.5806379476536665 , 6.218528262566369 ] ;
866
- var newX = [ - 0.5516431924882629 , 5.082159624413145 ] ;
867
- var newY = [ - 1.7947747709072441 , 5.004391439312791 ] ;
863
+ var originalX = [ - 0.3037383177570093 , 5.303738317757009 ] ;
864
+ var originalY = [ - 0.5532219548705213 , 6.191112269783224 ] ;
865
+ var newX = [ - 0.5373831775700935 , 5.070093457943925 ] ;
866
+ var newY = [ - 1.7575673521301185 , 4.986766872523626 ] ;
868
867
var precision = 5 ;
869
868
870
869
Plotly . plot ( gd , _mock )
@@ -973,25 +972,6 @@ describe('Test gl2d plots', function() {
973
972
. then ( done ) ;
974
973
} ) ;
975
974
976
- it ( 'should clear orphan cartesian subplots on addTraces' , function ( done ) {
977
- Plotly . newPlot ( gd , [ ] , {
978
- xaxis : { title : 'X' } ,
979
- yaxis : { title : 'Y' }
980
- } )
981
- . then ( function ( ) {
982
- return Plotly . addTraces ( gd , [ {
983
- type : 'scattergl' ,
984
- x : [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ] ,
985
- y : [ 0 , 5 , 8 , 9 , 8 , 5 , 0 ]
986
- } ] ) ;
987
- } )
988
- . then ( function ( ) {
989
- expect ( d3 . select ( '.xtitle' ) . size ( ) ) . toEqual ( 0 ) ;
990
- expect ( d3 . select ( '.ytitle' ) . size ( ) ) . toEqual ( 0 ) ;
991
- } )
992
- . then ( done ) ;
993
- } ) ;
994
-
995
975
it ( 'supports 1D and 2D Zoom' , function ( done ) {
996
976
var centerX , centerY ;
997
977
Plotly . newPlot ( gd ,
@@ -1026,8 +1006,8 @@ describe('Test gl2d plots', function() {
1026
1006
1027
1007
// no change - too small
1028
1008
mouseTo ( [ centerX , centerY ] , [ centerX - 5 , centerY + 5 ] ) ;
1029
- expect ( gd . layout . xaxis . range ) . toBeCloseToArray ( [ 6 , 8 ] , 3 ) ;
1030
- expect ( gd . layout . yaxis . range ) . toBeCloseToArray ( [ 5 , 7 ] , 3 ) ;
1009
+ expect ( gd . layout . xaxis . range ) . toBeCloseToArray ( [ 0 , 16 ] , 3 ) ;
1010
+ expect ( gd . layout . yaxis . range ) . toBeCloseToArray ( [ 0 , 16 ] , 3 ) ;
1031
1011
} )
1032
1012
. catch ( fail )
1033
1013
. then ( done ) ;
@@ -1073,17 +1053,17 @@ describe('Test gl2d plots', function() {
1073
1053
1074
1054
// no change - too small
1075
1055
mouseTo ( [ centerX , centerY ] , [ centerX - 5 , centerY + 5 ] ) ;
1076
- expect ( gd . layout . xaxis . range ) . toBeCloseToArray ( [ 4 , 6 ] , 3 ) ;
1077
- expect ( gd . layout . yaxis . range ) . toBeCloseToArray ( [ 9 , 10 ] , 3 ) ;
1056
+ expect ( gd . layout . xaxis . range ) . toBeCloseToArray ( [ - 8 , 24 ] , 3 ) ;
1057
+ expect ( gd . layout . yaxis . range ) . toBeCloseToArray ( [ 0 , 16 ] , 3 ) ;
1078
1058
1079
1059
return Plotly . relayout ( gd , {
1080
1060
'xaxis.autorange' : true ,
1081
1061
'yaxis.autorange' : true
1082
1062
} ) ;
1083
1063
} )
1084
1064
. then ( function ( ) {
1085
- expect ( gd . layout . xaxis . range ) . toBeCloseToArray ( [ - 8.09195 , 24.09195 ] , 3 ) ;
1086
- expect ( gd . layout . yaxis . range ) . toBeCloseToArray ( [ - 0.04598 , 16.04598 ] , 3 ) ;
1065
+ expect ( gd . layout . xaxis . range ) . toBeCloseToArray ( [ - 8.091954022988505 , 24.091954022988503 ] , 3 ) ;
1066
+ expect ( gd . layout . yaxis . range ) . toBeCloseToArray ( [ - 0.04597701149425282 , 16.04597701149425 ] , 3 ) ;
1087
1067
} )
1088
1068
. catch ( fail )
1089
1069
. then ( done ) ;
@@ -1136,9 +1116,10 @@ describe('Test removal of gl contexts', function() {
1136
1116
y : [ 2 , 1 , 3 ]
1137
1117
} ] )
1138
1118
. then ( function ( ) {
1139
- expect ( gd . _fullLayout . _plots . xy . _scene2d . glplot ) . toBeDefined ( ) ;
1119
+ expect ( gd . _fullLayout . _plots . xy . _scene ) . toBeDefined ( ) ;
1140
1120
1141
1121
Plots . cleanPlot ( [ ] , { } , gd . _fullData , gd . _fullLayout ) ;
1122
+
1142
1123
expect ( gd . _fullLayout . _plots ) . toEqual ( { } ) ;
1143
1124
} )
1144
1125
. then ( done ) ;
@@ -1188,7 +1169,7 @@ describe('Test removal of gl contexts', function() {
1188
1169
. then ( done ) ;
1189
1170
} ) ;
1190
1171
1191
- it ( 'Plotly.newPlot should remove gl context from the graph div of a gl2d plot' , function ( done ) {
1172
+ fit ( 'Plotly.newPlot should remove gl context from the graph div of a gl2d plot' , function ( done ) {
1192
1173
var firstGlplotObject , firstGlContext , firstCanvas ;
1193
1174
1194
1175
Plotly . plot ( gd , [ {
0 commit comments