Skip to content

Commit f29ec6f

Browse files
committed
#fi-51 PR feedback
1 parent f421d4e commit f29ec6f

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/traces/contourgl/convert.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ proto.update = function(fullTrace, calcTrace) {
9999

100100
// pass on fill information
101101
if(fullTrace.contours.coloring === 'fill') {
102-
colorOptions = convertColorscale(fullTrace, true);
102+
colorOptions = convertColorScale(fullTrace, {fill: true});
103103
this.contourOptions.levels = colorOptions.levels.slice(1);
104104
// though gl-contour2d automatically defaults to a transparent layer for the last
105105
// band color, it's set manually here in case the gl-contour2 API changes
@@ -108,7 +108,7 @@ proto.update = function(fullTrace, calcTrace) {
108108
return [0.25, 0.25, 0.25, 1.0];
109109
}));
110110
} else {
111-
colorOptions = convertColorscale(fullTrace, false);
111+
colorOptions = convertColorScale(fullTrace, {fill: false});
112112
this.contourOptions.levels = colorOptions.levels;
113113
this.contourOptions.levelColors = colorOptions.levelColors;
114114
}
@@ -138,11 +138,12 @@ function flattenZ(zIn, rowLen, colLen) {
138138
return zOut;
139139
}
140140

141-
function convertColorscale(fullTrace, fill) {
141+
function convertColorScale(fullTrace, options) {
142142
var contours = fullTrace.contours,
143143
start = contours.start,
144144
end = contours.end,
145-
cs = contours.size || 1;
145+
cs = contours.size || 1,
146+
fill = options.fill;
146147

147148
var colorMap = makeColorMap(fullTrace);
148149

test/jasmine/tests/gl2d_scatterplot_contour_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ describe('contourgl plots', function() {
172172
var gd;
173173

174174
beforeEach(function() {
175-
gd =createGraphDiv();
175+
gd = createGraphDiv();
176176
});
177177

178178
afterEach(function() {

test/jasmine/tests/gl_plot_interact_basic_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('gl3d plots', function() {
6161
var gd;
6262

6363
beforeEach(function() {
64-
gd =createGraphDiv();
64+
gd = createGraphDiv();
6565
});
6666

6767
afterEach(function() {

0 commit comments

Comments
 (0)