@@ -15,7 +15,7 @@ var Fx = require('../../components/fx');
15
15
var dragElement = require ( '../../components/dragelement' ) ;
16
16
17
17
var constants = require ( './constants' ) ;
18
- var dragBox = require ( './dragbox' ) ;
18
+ var makeDragBox = require ( './dragbox' ) . makeDragBox ;
19
19
20
20
module . exports = function initInteractions ( gd ) {
21
21
var fullLayout = gd . _fullLayout ;
@@ -56,7 +56,7 @@ module.exports = function initInteractions(gd) {
56
56
if ( ! plotinfo . mainplot ) {
57
57
// main dragger goes over the grids and data, so we use its
58
58
// mousemove events for all data hover effects
59
- var maindrag = dragBox ( gd , plotinfo , 0 , 0 ,
59
+ var maindrag = makeDragBox ( gd , plotinfo , 0 , 0 ,
60
60
xa . _length , ya . _length , 'ns' , 'ew' ) ;
61
61
62
62
maindrag . onmousemove = function ( evt ) {
@@ -100,13 +100,13 @@ module.exports = function initInteractions(gd) {
100
100
101
101
// corner draggers
102
102
if ( gd . _context . showAxisDragHandles ) {
103
- dragBox ( gd , plotinfo , - DRAGGERSIZE , - DRAGGERSIZE ,
103
+ makeDragBox ( gd , plotinfo , - DRAGGERSIZE , - DRAGGERSIZE ,
104
104
DRAGGERSIZE , DRAGGERSIZE , 'n' , 'w' ) ;
105
- dragBox ( gd , plotinfo , xa . _length , - DRAGGERSIZE ,
105
+ makeDragBox ( gd , plotinfo , xa . _length , - DRAGGERSIZE ,
106
106
DRAGGERSIZE , DRAGGERSIZE , 'n' , 'e' ) ;
107
- dragBox ( gd , plotinfo , - DRAGGERSIZE , ya . _length ,
107
+ makeDragBox ( gd , plotinfo , - DRAGGERSIZE , ya . _length ,
108
108
DRAGGERSIZE , DRAGGERSIZE , 's' , 'w' ) ;
109
- dragBox ( gd , plotinfo , xa . _length , ya . _length ,
109
+ makeDragBox ( gd , plotinfo , xa . _length , ya . _length ,
110
110
DRAGGERSIZE , DRAGGERSIZE , 's' , 'e' ) ;
111
111
}
112
112
}
@@ -115,21 +115,21 @@ module.exports = function initInteractions(gd) {
115
115
// these drag each axis separately
116
116
if ( isNumeric ( y0 ) ) {
117
117
if ( xa . anchor === 'free' ) y0 -= fullLayout . _size . h * ( 1 - ya . domain [ 1 ] ) ;
118
- dragBox ( gd , plotinfo , xa . _length * 0.1 , y0 ,
118
+ makeDragBox ( gd , plotinfo , xa . _length * 0.1 , y0 ,
119
119
xa . _length * 0.8 , DRAGGERSIZE , '' , 'ew' ) ;
120
- dragBox ( gd , plotinfo , 0 , y0 ,
120
+ makeDragBox ( gd , plotinfo , 0 , y0 ,
121
121
xa . _length * 0.1 , DRAGGERSIZE , '' , 'w' ) ;
122
- dragBox ( gd , plotinfo , xa . _length * 0.9 , y0 ,
122
+ makeDragBox ( gd , plotinfo , xa . _length * 0.9 , y0 ,
123
123
xa . _length * 0.1 , DRAGGERSIZE , '' , 'e' ) ;
124
124
}
125
125
// y axis draggers
126
126
if ( isNumeric ( x0 ) ) {
127
127
if ( ya . anchor === 'free' ) x0 -= fullLayout . _size . w * xa . domain [ 0 ] ;
128
- dragBox ( gd , plotinfo , x0 , ya . _length * 0.1 ,
128
+ makeDragBox ( gd , plotinfo , x0 , ya . _length * 0.1 ,
129
129
DRAGGERSIZE , ya . _length * 0.8 , 'ns' , '' ) ;
130
- dragBox ( gd , plotinfo , x0 , ya . _length * 0.9 ,
130
+ makeDragBox ( gd , plotinfo , x0 , ya . _length * 0.9 ,
131
131
DRAGGERSIZE , ya . _length * 0.1 , 's' , '' ) ;
132
- dragBox ( gd , plotinfo , x0 , 0 ,
132
+ makeDragBox ( gd , plotinfo , x0 , 0 ,
133
133
DRAGGERSIZE , ya . _length * 0.1 , 'n' , '' ) ;
134
134
}
135
135
}
0 commit comments