MCPcopy Index your code
hub / github.com/plotly/plotly.js / rotateMove

Function rotateMove

src/plots/polar/polar.js:1222–1240  ·  view source on GitHub ↗
(dx, dy)

Source from the content-addressed store, hash-verified

1220 }
1221
1222 function rotateMove(dx, dy) {
1223 // disable for inner drag boxes
1224 if(rngIndex === 0) return;
1225
1226 var x1 = tx + dx;
1227 var y1 = ty + dy;
1228
1229 angle1 = Math.atan2(cy - y1, x1 - cx);
1230 if(_this.vangles) angle1 = snapToVertexAngle(angle1, _this.vangles);
1231 angle1 = rad2deg(angle1);
1232
1233 var transform = strTranslate(cx, cy) + strRotate(-angle1);
1234 layers['radial-axis'].attr('transform', transform);
1235 layers['radial-line'].select('line').attr('transform', transform);
1236
1237 var fullLayoutNow = _this.gd._fullLayout;
1238 var polarLayoutNow = fullLayoutNow[_this.id];
1239 _this.updateRadialAxisTitle(fullLayoutNow, polarLayoutNow, angle1);
1240 }
1241
1242 function rerangeMove(dx, dy) {
1243 // project (dx, dy) unto unit radial axis vector

Callers

nothing calls this directly

Calls 2

snapToVertexAngleFunction · 0.85
rad2degFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…