Skip to content

Commit e3b6d2a

Browse files
committed
Minor cleanup from PR review
1 parent 8307c9e commit e3b6d2a

File tree

4 files changed

+8
-79
lines changed

4 files changed

+8
-79
lines changed

src/traces/contour/colorbar.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ module.exports = function colorbar(gd, cd) {
2020
var trace = cd[0].trace,
2121
cbId = 'cb' + trace.uid;
2222

23-
var contours = trace.contours,
24-
line = trace.line,
25-
cs = contours.size || 1,
26-
coloring = contours.coloring;
27-
2823
gd._fullLayout._infolayer.selectAll('.' + cbId).remove();
2924

3025
if(!trace.showscale) {
@@ -35,6 +30,11 @@ module.exports = function colorbar(gd, cd) {
3530
var cb = drawColorbar(gd, cbId);
3631
cd[0].t.cb = cb;
3732

33+
var contours = trace.contours,
34+
line = trace.line,
35+
cs = contours.size || 1,
36+
coloring = contours.coloring;
37+
3838
var colorMap = makeColorMap(trace, {isColorbar: true});
3939

4040
if(coloring === 'heatmap') {

src/traces/contourcarpet/plot.js

-71
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ function plotOne(gd, plotinfo, cd) {
125125

126126
// Clip the boundary of the plot:
127127
clipBoundary(plotGroup, carpet);
128-
129-
// Clip the space around null/undefined/missing data points:
130-
// clipGaps(plotGroup, plotinfo, cd[0], perimeter);
131128
}
132129

133130
function clipBoundary(plotGroup, carpet) {
@@ -235,71 +232,3 @@ function makeFills(trace, plotgroup, xa, ya, pathinfo, perimeter, ab2p, carpet,
235232
}
236233
});
237234
}
238-
239-
/* function clipGaps(plotGroup, plotinfo, cd0, perimeter) {
240-
var clipId = 'clip' + cd0.trace.uid;
241-
242-
var defs = plotinfo.plot.selectAll('defs')
243-
.data([0]);
244-
defs.enter().append('defs');
245-
246-
var clipPath = defs.selectAll('#' + clipId)
247-
.data(cd0.trace.connectgaps ? [] : [0]);
248-
clipPath.enter().append('clipPath').attr('id', clipId);
249-
clipPath.exit().remove();
250-
251-
if(cd0.trace.connectgaps === false) {
252-
var clipPathInfo = {
253-
// fraction of the way from missing to present point
254-
// to draw the boundary.
255-
// if you make this 1 (or 1-epsilon) then a point in
256-
// a sea of missing data will disappear entirely.
257-
level: 0.9,
258-
crossings: {},
259-
starts: [],
260-
edgepaths: [],
261-
paths: [],
262-
xaxis: plotinfo.xaxis,
263-
yaxis: plotinfo.yaxis,
264-
x: cd0.x,
265-
y: cd0.y,
266-
// 0 = no data, 1 = data
267-
z: makeClipMask(cd0),
268-
smoothing: 0
269-
};
270-
271-
makeCrossings([clipPathInfo]);
272-
findAllPaths([clipPathInfo]);
273-
var fullpath = joinAllPaths(clipPathInfo, perimeter);
274-
275-
var path = clipPath.selectAll('path')
276-
.data([0]);
277-
path.enter().append('path');
278-
path.attr('d', fullpath);
279-
}
280-
else clipId = null;
281-
282-
plotGroup.call(Drawing.setClipUrl, clipId);
283-
plotinfo.plot.selectAll('.hm' + cd0.trace.uid)
284-
.call(Drawing.setClipUrl, clipId);
285-
}*/
286-
287-
/* function makeClipMask(cd0) {
288-
var empties = cd0.trace._emptypoints,
289-
z = [],
290-
m = cd0.z.length,
291-
n = cd0.z[0].length,
292-
i,
293-
row = [],
294-
emptyPoint;
295-
296-
for(i = 0; i < n; i++) row.push(1);
297-
for(i = 0; i < m; i++) z.push(row.slice());
298-
for(i = 0; i < empties.length; i++) {
299-
emptyPoint = empties[i];
300-
z[emptyPoint[0]][emptyPoint[1]] = 0;
301-
}
302-
// save this mask to determine whether to show this data in hover
303-
cd0.zmask = z;
304-
return z;
305-
}*/

src/traces/scattercarpet/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ var ScatterCarpet = {};
1212

1313
ScatterCarpet.attributes = require('./attributes');
1414
ScatterCarpet.supplyDefaults = require('./defaults');
15-
// ScatterCarpet.colorbar = require('../scatter/colorbar');
15+
ScatterCarpet.colorbar = require('../scatter/colorbar');
1616
ScatterCarpet.calc = require('./calc');
1717
ScatterCarpet.plot = require('./plot');
18-
// ScatterCarpet.style = require('./style');
18+
ScatterCarpet.style = require('./style');
1919
ScatterCarpet.hoverPoints = require('./hover');
20-
// ScatterCarpet.selectPoints = require('./select');
20+
ScatterCarpet.selectPoints = require('./select');
2121

2222
ScatterCarpet.moduleType = 'trace';
2323
ScatterCarpet.name = 'scattercarpet';
-16 Bytes
Loading

0 commit comments

Comments
 (0)