@@ -153,36 +153,39 @@ fx.init = function(gd) {
153
153
} ;
154
154
155
155
// corner draggers
156
- dragBox ( gd , plotinfo , - DRAGGERSIZE , - DRAGGERSIZE ,
157
- DRAGGERSIZE , DRAGGERSIZE , 'n' , 'w' ) ;
158
- dragBox ( gd , plotinfo , xa . _length , - DRAGGERSIZE ,
159
- DRAGGERSIZE , DRAGGERSIZE , 'n' , 'e' ) ;
160
- dragBox ( gd , plotinfo , - DRAGGERSIZE , ya . _length ,
161
- DRAGGERSIZE , DRAGGERSIZE , 's' , 'w' ) ;
162
- dragBox ( gd , plotinfo , xa . _length , ya . _length ,
163
- DRAGGERSIZE , DRAGGERSIZE , 's' , 'e' ) ;
164
- }
165
-
166
- // x axis draggers - if you have overlaid plots,
167
- // these drag each axis separately
168
- if ( isNumeric ( y0 ) ) {
169
- if ( xa . anchor === 'free' ) y0 -= fullLayout . _size . h * ( 1 - ya . domain [ 1 ] ) ;
170
- dragBox ( gd , plotinfo , xa . _length * 0.1 , y0 ,
171
- xa . _length * 0.8 , DRAGGERSIZE , '' , 'ew' ) ;
172
- dragBox ( gd , plotinfo , 0 , y0 ,
173
- xa . _length * 0.1 , DRAGGERSIZE , '' , 'w' ) ;
174
- dragBox ( gd , plotinfo , xa . _length * 0.9 , y0 ,
175
- xa . _length * 0.1 , DRAGGERSIZE , '' , 'e' ) ;
156
+ if ( gd . _context . showAxisDragHandles ) {
157
+ dragBox ( gd , plotinfo , - DRAGGERSIZE , - DRAGGERSIZE ,
158
+ DRAGGERSIZE , DRAGGERSIZE , 'n' , 'w' ) ;
159
+ dragBox ( gd , plotinfo , xa . _length , - DRAGGERSIZE ,
160
+ DRAGGERSIZE , DRAGGERSIZE , 'n' , 'e' ) ;
161
+ dragBox ( gd , plotinfo , - DRAGGERSIZE , ya . _length ,
162
+ DRAGGERSIZE , DRAGGERSIZE , 's' , 'w' ) ;
163
+ dragBox ( gd , plotinfo , xa . _length , ya . _length ,
164
+ DRAGGERSIZE , DRAGGERSIZE , 's' , 'e' ) ;
165
+ }
176
166
}
177
- // y axis draggers
178
- if ( isNumeric ( x0 ) ) {
179
- if ( ya . anchor === 'free' ) x0 -= fullLayout . _size . w * xa . domain [ 0 ] ;
180
- dragBox ( gd , plotinfo , x0 , ya . _length * 0.1 ,
181
- DRAGGERSIZE , ya . _length * 0.8 , 'ns' , '' ) ;
182
- dragBox ( gd , plotinfo , x0 , ya . _length * 0.9 ,
183
- DRAGGERSIZE , ya . _length * 0.1 , 's' , '' ) ;
184
- dragBox ( gd , plotinfo , x0 , 0 ,
185
- DRAGGERSIZE , ya . _length * 0.1 , 'n' , '' ) ;
167
+ if ( gd . _context . showAxisDragHandles ) {
168
+ // x axis draggers - if you have overlaid plots,
169
+ // these drag each axis separately
170
+ if ( isNumeric ( y0 ) ) {
171
+ if ( xa . anchor === 'free' ) y0 -= fullLayout . _size . h * ( 1 - ya . domain [ 1 ] ) ;
172
+ dragBox ( gd , plotinfo , xa . _length * 0.1 , y0 ,
173
+ xa . _length * 0.8 , DRAGGERSIZE , '' , 'ew' ) ;
174
+ dragBox ( gd , plotinfo , 0 , y0 ,
175
+ xa . _length * 0.1 , DRAGGERSIZE , '' , 'w' ) ;
176
+ dragBox ( gd , plotinfo , xa . _length * 0.9 , y0 ,
177
+ xa . _length * 0.1 , DRAGGERSIZE , '' , 'e' ) ;
178
+ }
179
+ // y axis draggers
180
+ if ( isNumeric ( x0 ) ) {
181
+ if ( ya . anchor === 'free' ) x0 -= fullLayout . _size . w * xa . domain [ 0 ] ;
182
+ dragBox ( gd , plotinfo , x0 , ya . _length * 0.1 ,
183
+ DRAGGERSIZE , ya . _length * 0.8 , 'ns' , '' ) ;
184
+ dragBox ( gd , plotinfo , x0 , ya . _length * 0.9 ,
185
+ DRAGGERSIZE , ya . _length * 0.1 , 's' , '' ) ;
186
+ dragBox ( gd , plotinfo , x0 , 0 ,
187
+ DRAGGERSIZE , ya . _length * 0.1 , 'n' , '' ) ;
188
+ }
186
189
}
187
190
} ) ;
188
191
0 commit comments