@@ -378,7 +378,7 @@ describe('Test gl2d plots', function() {
378
378
. then ( done ) ;
379
379
} ) ;
380
380
381
- it ( '@noCI should display selection of big number of points' , function ( done ) {
381
+ it ( '@noCI should display selection of big number of regular points' , function ( done ) {
382
382
// generate large number of points
383
383
var x = [ ] , y = [ ] , n = 2e2 , N = n * n ;
384
384
for ( var i = 0 ; i < N ; i ++ ) {
@@ -406,6 +406,46 @@ describe('Test gl2d plots', function() {
406
406
. then ( done ) ;
407
407
} ) ;
408
408
409
+
410
+ it ( '@noCI should display selection of big number of miscellaneous points' , function ( done ) {
411
+ var colorList = [
412
+ '#006385' , '#F06E75' , '#90ed7d' , '#f7a35c' , '#8085e9' ,
413
+ '#f15c80' , '#e4d354' , '#2b908f' , '#f45b5b' , '#91e8e1' ,
414
+ '#5DA5DA' , '#F06E75' , '#F15854' , '#B2912F' , '#B276B2' ,
415
+ '#DECF3F' , '#FAA43A' , '#4D4D4D' , '#F17CB0' , '#60BD68'
416
+ ] ;
417
+
418
+ // generate large number of points
419
+ var x = [ ] , y = [ ] , n = 2e2 , N = n * n , color = [ ] , symbol = [ ] , size = [ ] ;
420
+ for ( var i = 0 ; i < N ; i ++ ) {
421
+ x . push ( ( i % n ) / n ) ;
422
+ y . push ( i / N ) ;
423
+ color . push ( colorList [ i % colorList . length ] ) ;
424
+ symbol . push ( 'x' ) ;
425
+ size . push ( 6 ) ;
426
+ }
427
+
428
+ var mock = {
429
+ data : [ {
430
+ x : x , y : y , type : 'scattergl' , mode : 'markers' ,
431
+ marker : { symbol : symbol , size : size , color : color }
432
+ } ] ,
433
+ layout : {
434
+ dragmode : 'select'
435
+ }
436
+ } ;
437
+
438
+ Plotly . plot ( gd , mock )
439
+ . then ( select ( [ [ 160 , 100 ] , [ 180 , 100 ] ] ) )
440
+ . then ( function ( ) {
441
+ expect ( readPixel ( gd . querySelector ( '.gl-canvas-context' ) , 168 , 100 ) [ 3 ] ) . toBe ( 0 ) ;
442
+ expect ( readPixel ( gd . querySelector ( '.gl-canvas-context' ) , 158 , 100 ) [ 3 ] ) . not . toBe ( 0 ) ;
443
+ expect ( readPixel ( gd . querySelector ( '.gl-canvas-focus' ) , 168 , 100 ) [ 3 ] ) . not . toBe ( 0 ) ;
444
+ } )
445
+ . catch ( fail )
446
+ . then ( done ) ;
447
+ } ) ;
448
+
409
449
it ( 'should be able to toggle from svg to gl' , function ( done ) {
410
450
Plotly . plot ( gd , [ {
411
451
y : [ 1 , 2 , 1 ] ,
0 commit comments