@@ -23,11 +23,6 @@ var MINSELECT = constants.MINSELECT;
2323
2424function getAxId ( ax ) { return ax . _id ; }
2525
26- function visible ( searchInfo ) {
27- var cd0 = searchInfo . cd [ 0 ] ;
28- return cd0 && cd0 . trace && cd0 . trace . visible === true ;
29- }
30-
3126module . exports = function prepSelect ( e , startX , startY , dragOptions , mode ) {
3227 var zoomLayer = dragOptions . gd . _fullLayout . _zoomlayer ,
3328 dragBBox = dragOptions . element . getBoundingClientRect ( ) ,
@@ -79,7 +74,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
7974 for ( i = 0 ; i < gd . calcdata . length ; i ++ ) {
8075 cd = gd . calcdata [ i ] ;
8176 trace = cd [ 0 ] . trace ;
82- if ( ! trace . _module || ! trace . _module . selectPoints ) continue ;
77+ if ( trace . visible !== true || ! trace . _module || ! trace . _module . selectPoints ) continue ;
8378
8479 if ( dragOptions . subplot ) {
8580 if (
@@ -195,7 +190,6 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
195190 selection = [ ] ;
196191 for ( i = 0 ; i < searchTraces . length ; i ++ ) {
197192 searchInfo = searchTraces [ i ] ;
198- if ( ! visible ( searchInfo ) ) continue ;
199193 var thisSelection = fillSelectionItem (
200194 searchInfo . selectPoints ( searchInfo , poly ) , searchInfo
201195 ) ;
@@ -224,7 +218,6 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
224218 outlines . remove ( ) ;
225219 for ( i = 0 ; i < searchTraces . length ; i ++ ) {
226220 searchInfo = searchTraces [ i ] ;
227- if ( ! visible ( searchInfo ) ) continue ;
228221 searchInfo . selectPoints ( searchInfo , false ) ;
229222 }
230223
0 commit comments