Skip to content

Commit 89fb6bb

Browse files
committed
add a few DRY up TODOs
1 parent c5cda6b commit 89fb6bb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/plots/cartesian/dragbox.js

+1
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
715715

716716
// clear gl frame, if any, since we preserve drawing buffer
717717
// FIXME: code duplication with cartesian.plot
718+
// TODO DRY this up!!
718719
if(fullLayout._glcanvas && fullLayout._glcanvas.size()) {
719720
fullLayout._glcanvas.each(function(d) {
720721
if(d.regl) d.regl.clear({color: true});

src/traces/splom/base_plot.js

+3
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function drawGrid(gd) {
9393
splomGrid.draw();
9494
}
9595

96+
// this clocks in at ~30ms at 50x50 - we could perf this up!
9697
function makeGridData(gd) {
9798
var fullLayout = gd._fullLayout;
9899
var gs = fullLayout._size;
@@ -170,6 +171,8 @@ function makeGridData(gd) {
170171
return gridBatches;
171172
}
172173

174+
// just like in Axes.doTicks but without the loop over traces
175+
// TODO dry this up
173176
function showZeroLine(ax) {
174177
var rng = Lib.simpleMap(ax.range, ax.r2l);
175178
var p0 = ax.l2p(0);

0 commit comments

Comments
 (0)