@@ -178,23 +178,23 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
178
178
prepSelect ( e , startX , startY , dragOptions , dragModeNow ) ;
179
179
} else {
180
180
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
+ }
198
198
}
199
199
}
200
200
} ;
@@ -285,8 +285,6 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
285
285
zb = makeZoombox ( zoomlayer , lum , xs , ys , path0 ) ;
286
286
287
287
corners = makeCorners ( zoomlayer , xs , ys ) ;
288
-
289
- clearAndResetSelect ( ) ;
290
288
}
291
289
292
290
function zoomMove ( dx0 , dy0 ) {
0 commit comments