@@ -171,31 +171,13 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
171
171
else if ( isSelectOrLasso ( dragModeNow ) ) {
172
172
dragOptions . xaxes = xa ;
173
173
dragOptions . yaxes = ya ;
174
-
175
- // take over selection polygons from prev mode, if any
176
- if ( ( e . shiftKey || e . altKey ) && ( plotinfo . selection && plotinfo . selection . polygons ) && ! dragOptions . polygons ) {
177
- dragOptions . polygons = plotinfo . selection . polygons ;
178
- dragOptions . mergedPolygons = plotinfo . selection . mergedPolygons ;
179
- }
180
- // create new polygons, if shift mode
181
- else if ( ( ! e . shiftKey && ! e . altKey ) || ( ( e . shiftKey || e . altKey ) && ! plotinfo . selection ) ) {
182
- plotinfo . selection = { } ;
183
- plotinfo . selection . polygons = dragOptions . polygons = [ ] ;
184
- plotinfo . selection . mergedPolygons = dragOptions . mergedPolygons = [ ] ;
185
- }
186
-
187
174
prepSelect ( e , startX , startY , dragOptions , dragModeNow ) ;
188
175
}
189
176
}
190
177
} ;
191
178
192
179
dragElement . init ( dragOptions ) ;
193
180
194
- // FIXME: this hack highlights selection once we enter select/lasso mode
195
- if ( isSelectOrLasso ( gd . _fullLayout . dragmode ) && plotinfo . selection ) {
196
- showSelect ( zoomlayer , dragOptions ) ;
197
- }
198
-
199
181
var x0 ,
200
182
y0 ,
201
183
box ,
@@ -548,8 +530,6 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
548
530
549
531
updateSubplots ( [ x0 , y0 , pw - dx , ph - dy ] ) ;
550
532
551
- if ( plotinfo . ondrag ) plotinfo . ondrag . call ( [ x0 , y0 , pw - dx , ph - dy ] ) ;
552
-
553
533
ticksAndAnnotations ( yActive , xActive ) ;
554
534
}
555
535
@@ -926,31 +906,6 @@ function clearSelect(zoomlayer) {
926
906
zoomlayer . selectAll ( '.select-outline' ) . remove ( ) ;
927
907
}
928
908
929
- function showSelect ( zoomlayer , dragOptions ) {
930
- var outlines = zoomlayer . selectAll ( 'path.select-outline' ) . data ( [ 1 , 2 ] ) ,
931
- plotinfo = dragOptions . plotinfo ,
932
- xaxis = plotinfo . xaxis ,
933
- yaxis = plotinfo . yaxis ,
934
- selection = plotinfo . selection ,
935
- polygons = selection . mergedPolygons ,
936
- xs = xaxis . _offset ,
937
- ys = yaxis . _offset ,
938
- paths = [ ] ;
939
-
940
- for ( var i = 0 ; i < polygons . length ; i ++ ) {
941
- var ppts = polygons [ i ] ;
942
- paths . push ( ppts . join ( 'L' ) + 'L' + ppts [ 0 ] ) ;
943
- }
944
-
945
- if ( paths . length ) {
946
- outlines . enter ( )
947
- . append ( 'path' )
948
- . attr ( 'class' , function ( d ) { return 'select-outline select-outline-' + d ; } )
949
- . attr ( 'transform' , 'translate(' + xs + ', ' + ys + ')' )
950
- . attr ( 'd' , 'M' + paths . join ( 'M' ) + 'Z' ) ;
951
- }
952
- }
953
-
954
909
function updateZoombox ( zb , corners , box , path0 , dimmed , lum ) {
955
910
zb . attr ( 'd' ,
956
911
path0 + 'M' + ( box . l ) + ',' + ( box . t ) + 'v' + ( box . h ) +
0 commit comments