Skip to content

Commit 23b4d3c

Browse files
committed
888: fix polar plot rotation
1 parent f3c03cd commit 23b4d3c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/plots/polar/polar.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,9 @@ proto.updateAngularDrag = function(fullLayout) {
11971197
var fullLayoutNow = _this.gd._fullLayout;
11981198
var polarLayoutNow = fullLayoutNow[_this.id];
11991199

1200+
dx *= fullLayout._inverseScaleX;
1201+
dy *= fullLayout._inverseScaleY;
1202+
12001203
var x1 = x0 + dx;
12011204
var y1 = y0 + dy;
12021205
var a1 = xy2a(x1, y1);
@@ -1291,6 +1294,11 @@ proto.updateAngularDrag = function(fullLayout) {
12911294
var bbox = angularDrag.getBoundingClientRect();
12921295
x0 = startX - bbox.left;
12931296
y0 = startY - bbox.top;
1297+
1298+
var transformedCoords = Lib.apply3DTransform(fullLayout._inverseTransform)(x0, y0);
1299+
x0 = transformedCoords[0];
1300+
y0 = transformedCoords[1];
1301+
12941302
a0 = xy2a(x0, y0);
12951303

12961304
dragOpts.moveFn = moveFn;

0 commit comments

Comments
 (0)