Skip to content

Commit f1f06f4

Browse files
committed
add a few comments
1 parent 1f61ff0 commit f1f06f4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/plots/cartesian/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
216216
var className = (_module.layerName || name + 'layer');
217217
var plotMethod = _module.plot;
218218

219-
// plot all traces of this type on this subplot at once
219+
// plot all visible traces of this type on this subplot at once
220220
cdModuleAndOthers = getModuleCalcData(cdSubplot, plotMethod);
221221
cdModule = cdModuleAndOthers[0];
222222
// don't need to search the found traces again - in fact we need to NOT

src/plots/get_data.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ exports.getModuleCalcData = function(calcdata, arg1) {
6969
for(var i = 0; i < calcdata.length; i++) {
7070
var cd = calcdata[i];
7171
var trace = cd[0].trace;
72+
// N.B. 'legendonly' traces do not make it pass here
7273
if(trace.visible !== true) continue;
7374

7475
// group calcdata trace not by 'module' (as the name of this function

src/traces/scattergl/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ function plot(gd, subplot, cdata) {
572572
}
573573

574574
// precalculate px coords since we are not going to pan during select
575+
// TODO, could do better here e.g.
576+
// - spin that in a webworker
577+
// - compute selection from polygons in data coordinates
578+
// (maybe just for linear axes)
575579
var xpx = stash.xpx = new Array(stash.count);
576580
var ypx = stash.ypx = new Array(stash.count);
577581
for(j = 0; j < stash.count; j++) {
@@ -614,6 +618,7 @@ function plot(gd, subplot, cdata) {
614618
// provide viewport and range
615619
var vpRange0 = {
616620
viewport: getViewport(fullLayout, xaxis, yaxis),
621+
// TODO do we need those fallbacks?
617622
range: [
618623
(xaxis._rl || xaxis.range)[0],
619624
(yaxis._rl || yaxis.range)[0],

0 commit comments

Comments
 (0)