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

Function recomputeAxisLists

src/plots/cartesian/dragbox.js:94–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92 x += plotinfo.yaxis._shift;
93
94 function recomputeAxisLists() {
95 xa0 = plotinfo.xaxis;
96 ya0 = plotinfo.yaxis;
97 pw = xa0._length;
98 ph = ya0._length;
99 xs = xa0._offset;
100 ys = ya0._offset;
101
102 xaHash = {};
103 xaHash[xa0._id] = xa0;
104 yaHash = {};
105 yaHash[ya0._id] = ya0;
106
107 // if we're dragging two axes at once, also drag overlays
108 if(ns && ew) {
109 var overlays = plotinfo.overlays;
110 for(var i = 0; i < overlays.length; i++) {
111 var xa = overlays[i].xaxis;
112 xaHash[xa._id] = xa;
113 var ya = overlays[i].yaxis;
114 yaHash[ya._id] = ya;
115 }
116 }
117
118 xaxes = hashValues(xaHash);
119 yaxes = hashValues(yaHash);
120 xActive = isDirectionActive(xaxes, ew);
121 yActive = isDirectionActive(yaxes, ns);
122 allFixedRanges = !yActive && !xActive;
123
124 matches = calcLinks(gd, gd._fullLayout._axisMatchGroups, xaHash, yaHash);
125 links = calcLinks(gd, gd._fullLayout._axisConstraintGroups, xaHash, yaHash, matches);
126 var spConstrained = links.isSubplotConstrained || matches.isSubplotConstrained;
127 editX = ew || spConstrained;
128 editY = ns || spConstrained;
129
130 var fullLayout = gd._fullLayout;
131 hasScatterGl = fullLayout._has('scattergl');
132 hasSplom = fullLayout._has('splom');
133 hasSVG = fullLayout._has('svg');
134 }
135
136 recomputeAxisLists();
137

Callers 2

makeDragBoxFunction · 0.85
zoomWheelFunction · 0.85

Calls 3

hashValuesFunction · 0.85
isDirectionActiveFunction · 0.85
calcLinksFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…