@@ -680,8 +680,8 @@ proto.updateMainDrag = function(fullLayout) {
680680 var chw = constants . cornerHalfWidth ;
681681 var chl = constants . cornerLen / 2 ;
682682
683- var scaleX = gd . _fullLayout . _inverseScaleX ;
684- var scaleY = gd . _fullLayout . _inverseScaleY ;
683+ var scaleX ;
684+ var scaleY ;
685685
686686 var mainDrag = dragBox . makeDragger ( layers , 'path' , 'maindrag' , 'crosshair' ) ;
687687
@@ -943,7 +943,10 @@ proto.updateMainDrag = function(fullLayout) {
943943 var dragModeNow = gd . _fullLayout . dragmode ;
944944
945945 var bbox = mainDrag . getBoundingClientRect ( ) ;
946- var inverse = gd . _fullLayout . _inverseTransform ;
946+ gd . _fullLayout . _calcInverseTransform ( gd ) ;
947+ var inverse = gd . _fullLayout . _invTransform ;
948+ scaleX = gd . _fullLayout . _invScaleX ;
949+ scaleY = gd . _fullLayout . _invScaleY ;
947950 var transformedCoords = Lib . apply3DTransform ( inverse ) ( startX - bbox . left , startY - bbox . top ) ;
948951 x0 = transformedCoords [ 0 ] ;
949952 y0 = transformedCoords [ 1 ] ;
@@ -1198,8 +1201,8 @@ proto.updateAngularDrag = function(fullLayout) {
11981201 var fullLayoutNow = _this . gd . _fullLayout ;
11991202 var polarLayoutNow = fullLayoutNow [ _this . id ] ;
12001203
1201- var x1 = x0 + dx * fullLayout . _inverseScaleX ;
1202- var y1 = y0 + dy * fullLayout . _inverseScaleY ;
1204+ var x1 = x0 + dx * fullLayout . _invScaleX ;
1205+ var y1 = y0 + dy * fullLayout . _invScaleY ;
12031206 var a1 = xy2a ( x1 , y1 ) ;
12041207 var da = rad2deg ( a1 - a0 ) ;
12051208 rot1 = rot0 + da ;
@@ -1293,7 +1296,8 @@ proto.updateAngularDrag = function(fullLayout) {
12931296 x0 = startX - bbox . left ;
12941297 y0 = startY - bbox . top ;
12951298
1296- var transformedCoords = Lib . apply3DTransform ( fullLayout . _inverseTransform ) ( x0 , y0 ) ;
1299+ gd . _fullLayout . _calcInverseTransform ( gd ) ;
1300+ var transformedCoords = Lib . apply3DTransform ( fullLayout . _invTransform ) ( x0 , y0 ) ;
12971301 x0 = transformedCoords [ 0 ] ;
12981302 y0 = transformedCoords [ 1 ] ;
12991303
0 commit comments