@@ -178,23 +178,23 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
178178 prepSelect ( e , startX , startY , dragOptions , dragModeNow ) ;
179179 } else {
180180 dragOptions . clickFn = clickFn ;
181-
182- if ( allFixedRanges ) {
183- clearAndResetSelect ( ) ;
184- } else if ( dragModeNow === 'zoom' ) {
185- dragOptions . moveFn = zoomMove ;
186- dragOptions . doneFn = zoomDone ;
187-
188- // zoomMove takes care of the threshold, but we need to
189- // minimize this so that constrained zoom boxes will flip
190- // orientation at the right place
191- dragOptions . minDrag = 1 ;
192-
193- zoomPrep ( e , startX , startY ) ;
194- } else if ( dragModeNow === 'pan' ) {
195- dragOptions . moveFn = plotDrag ;
196- dragOptions . doneFn = dragTail ;
197- clearAndResetSelect ( ) ;
181+ clearAndResetSelect ( ) ;
182+
183+ if ( ! allFixedRanges ) {
184+ if ( dragModeNow === 'zoom' ) {
185+ dragOptions . moveFn = zoomMove ;
186+ dragOptions . doneFn = zoomDone ;
187+
188+ // zoomMove takes care of the threshold, but we need to
189+ // minimize this so that constrained zoom boxes will flip
190+ // orientation at the right place
191+ dragOptions . minDrag = 1 ;
192+
193+ zoomPrep ( e , startX , startY ) ;
194+ } else if ( dragModeNow === 'pan' ) {
195+ dragOptions . moveFn = plotDrag ;
196+ dragOptions . doneFn = dragTail ;
197+ }
198198 }
199199 }
200200 } ;
@@ -285,8 +285,6 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
285285 zb = makeZoombox ( zoomlayer , lum , xs , ys , path0 ) ;
286286
287287 corners = makeCorners ( zoomlayer , xs , ys ) ;
288-
289- clearAndResetSelect ( ) ;
290288 }
291289
292290 function zoomMove ( dx0 , dy0 ) {
0 commit comments