@@ -48,17 +48,17 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
48
48
var fullLayout = gd . _fullLayout ,
49
49
// if we're dragging two axes at once, also drag overlays
50
50
subplots = [ plotinfo ] . concat ( ( ns && ew ) ? plotinfo . overlays : [ ] ) ,
51
- xa = [ plotinfo . x ( ) ] ,
52
- ya = [ plotinfo . y ( ) ] ,
51
+ xa = [ plotinfo . xaxis ] ,
52
+ ya = [ plotinfo . yaxis ] ,
53
53
pw = xa [ 0 ] . _length ,
54
54
ph = ya [ 0 ] . _length ,
55
55
MINDRAG = constants . MINDRAG ,
56
56
MINZOOM = constants . MINZOOM ,
57
57
isMainDrag = ( ns + ew === 'nsew' ) ;
58
58
59
59
for ( var i = 1 ; i < subplots . length ; i ++ ) {
60
- var subplotXa = subplots [ i ] . x ( ) ,
61
- subplotYa = subplots [ i ] . y ( ) ;
60
+ var subplotXa = subplots [ i ] . xaxis ,
61
+ subplotYa = subplots [ i ] . yaxis ;
62
62
if ( xa . indexOf ( subplotXa ) === - 1 ) xa . push ( subplotXa ) ;
63
63
if ( ya . indexOf ( subplotYa ) === - 1 ) ya . push ( subplotYa ) ;
64
64
}
@@ -146,8 +146,8 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
146
146
dragElement . init ( dragOptions ) ;
147
147
148
148
var zoomlayer = gd . _fullLayout . _zoomlayer ,
149
- xs = plotinfo . x ( ) . _offset ,
150
- ys = plotinfo . y ( ) . _offset ,
149
+ xs = plotinfo . xaxis . _offset ,
150
+ ys = plotinfo . yaxis . _offset ,
151
151
x0 ,
152
152
y0 ,
153
153
box ,
@@ -159,23 +159,23 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
159
159
corners ;
160
160
161
161
function recomputeAxisLists ( ) {
162
- xa = [ plotinfo . x ( ) ] ;
163
- ya = [ plotinfo . y ( ) ] ;
162
+ xa = [ plotinfo . xaxis ] ;
163
+ ya = [ plotinfo . yaxis ] ;
164
164
pw = xa [ 0 ] . _length ;
165
165
ph = ya [ 0 ] . _length ;
166
166
167
167
for ( var i = 1 ; i < subplots . length ; i ++ ) {
168
- var subplotXa = subplots [ i ] . x ( ) ,
169
- subplotYa = subplots [ i ] . y ( ) ;
168
+ var subplotXa = subplots [ i ] . xaxis ,
169
+ subplotYa = subplots [ i ] . yaxis ;
170
170
if ( xa . indexOf ( subplotXa ) === - 1 ) xa . push ( subplotXa ) ;
171
171
if ( ya . indexOf ( subplotYa ) === - 1 ) ya . push ( subplotYa ) ;
172
172
}
173
173
allaxes = xa . concat ( ya ) ;
174
174
xActive = isDirectionActive ( xa , ew ) ;
175
175
yActive = isDirectionActive ( ya , ns ) ;
176
176
cursor = getDragCursor ( yActive + xActive , fullLayout . dragmode ) ;
177
- xs = plotinfo . x ( ) . _offset ;
178
- ys = plotinfo . y ( ) . _offset ;
177
+ xs = plotinfo . xaxis . _offset ;
178
+ ys = plotinfo . yaxis . _offset ;
179
179
dragOptions . xa = xa ;
180
180
dragOptions . ya = ya ;
181
181
}
@@ -656,8 +656,8 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
656
656
for ( var i = 0 ; i < subplots . length ; i ++ ) {
657
657
658
658
var subplot = plotinfos [ subplots [ i ] ] ,
659
- xa2 = subplot . x ( ) ,
660
- ya2 = subplot . y ( ) ,
659
+ xa2 = subplot . xaxis ,
660
+ ya2 = subplot . yaxis ,
661
661
editX = ew && ! xa2 . fixedrange ,
662
662
editY = ns && ! ya2 . fixedrange ;
663
663
0 commit comments