@@ -48,17 +48,17 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
4848 var fullLayout = gd . _fullLayout ,
4949 // if we're dragging two axes at once, also drag overlays
5050 subplots = [ plotinfo ] . concat ( ( ns && ew ) ? plotinfo . overlays : [ ] ) ,
51- xa = [ plotinfo . x ( ) ] ,
52- ya = [ plotinfo . y ( ) ] ,
51+ xa = [ plotinfo . xaxis ] ,
52+ ya = [ plotinfo . yaxis ] ,
5353 pw = xa [ 0 ] . _length ,
5454 ph = ya [ 0 ] . _length ,
5555 MINDRAG = constants . MINDRAG ,
5656 MINZOOM = constants . MINZOOM ,
5757 isMainDrag = ( ns + ew === 'nsew' ) ;
5858
5959 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 ;
6262 if ( xa . indexOf ( subplotXa ) === - 1 ) xa . push ( subplotXa ) ;
6363 if ( ya . indexOf ( subplotYa ) === - 1 ) ya . push ( subplotYa ) ;
6464 }
@@ -146,8 +146,8 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
146146 dragElement . init ( dragOptions ) ;
147147
148148 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 ,
151151 x0 ,
152152 y0 ,
153153 box ,
@@ -159,23 +159,23 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
159159 corners ;
160160
161161 function recomputeAxisLists ( ) {
162- xa = [ plotinfo . x ( ) ] ;
163- ya = [ plotinfo . y ( ) ] ;
162+ xa = [ plotinfo . xaxis ] ;
163+ ya = [ plotinfo . yaxis ] ;
164164 pw = xa [ 0 ] . _length ;
165165 ph = ya [ 0 ] . _length ;
166166
167167 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 ;
170170 if ( xa . indexOf ( subplotXa ) === - 1 ) xa . push ( subplotXa ) ;
171171 if ( ya . indexOf ( subplotYa ) === - 1 ) ya . push ( subplotYa ) ;
172172 }
173173 allaxes = xa . concat ( ya ) ;
174174 xActive = isDirectionActive ( xa , ew ) ;
175175 yActive = isDirectionActive ( ya , ns ) ;
176176 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 ;
179179 dragOptions . xa = xa ;
180180 dragOptions . ya = ya ;
181181 }
@@ -656,8 +656,8 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
656656 for ( var i = 0 ; i < subplots . length ; i ++ ) {
657657
658658 var subplot = plotinfos [ subplots [ i ] ] ,
659- xa2 = subplot . x ( ) ,
660- ya2 = subplot . y ( ) ,
659+ xa2 = subplot . xaxis ,
660+ ya2 = subplot . yaxis ,
661661 editX = ew && ! xa2 . fixedrange ,
662662 editY = ns && ! ya2 . fixedrange ;
663663
0 commit comments