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

Function moveFn

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

Source from the content-addressed store, hash-verified

1184 var rprime;
1185
1186 function moveFn(dx, dy) {
1187 if(moveFn2) {
1188 moveFn2(dx, dy);
1189 } else {
1190 var dvec = [dx, -dy];
1191 var rvec = [Math.cos(angle0), Math.sin(angle0)];
1192 var comp = Math.abs(Lib.dot(dvec, rvec) / Math.sqrt(Lib.dot(dvec, dvec)));
1193
1194 // mostly perpendicular motions rotate,
1195 // mostly parallel motions re-range
1196 if(!isNaN(comp)) {
1197 moveFn2 = comp < 0.5 ? rotateMove : rerangeMove;
1198 }
1199 }
1200
1201 var update = {};
1202 computeRadialAxisUpdates(update);
1203 gd.emit('plotly_relayouting', update);
1204 }
1205
1206 function computeRadialAxisUpdates(update) {
1207 if(angle1 !== null) {

Callers

nothing calls this directly

Calls 4

computeRadialAxisUpdatesFunction · 0.85
xy2aFunction · 0.85
rad2degFunction · 0.85
computeRotationUpdatesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…