Skip to content

#fi-51 PR feedback #543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/traces/contourgl/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ proto.update = function(fullTrace, calcTrace) {

// pass on fill information
if(fullTrace.contours.coloring === 'fill') {
colorOptions = convertColorscale(fullTrace, true);
colorOptions = convertColorScale(fullTrace, {fill: true});
this.contourOptions.levels = colorOptions.levels.slice(1);
// though gl-contour2d automatically defaults to a transparent layer for the last
// band color, it's set manually here in case the gl-contour2 API changes
Expand All @@ -108,7 +108,7 @@ proto.update = function(fullTrace, calcTrace) {
return [0.25, 0.25, 0.25, 1.0];
}));
} else {
colorOptions = convertColorscale(fullTrace, false);
colorOptions = convertColorScale(fullTrace, {fill: false});
this.contourOptions.levels = colorOptions.levels;
this.contourOptions.levelColors = colorOptions.levelColors;
}
Expand Down Expand Up @@ -138,11 +138,12 @@ function flattenZ(zIn, rowLen, colLen) {
return zOut;
}

function convertColorscale(fullTrace, fill) {
function convertColorScale(fullTrace, options) {
var contours = fullTrace.contours,
start = contours.start,
end = contours.end,
cs = contours.size || 1;
cs = contours.size || 1,
fill = options.fill;

var colorMap = makeColorMap(fullTrace);

Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/gl2d_scatterplot_contour_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ describe('contourgl plots', function() {
var gd;

beforeEach(function() {
gd =createGraphDiv();
gd = createGraphDiv();
});

afterEach(function() {
Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/gl_plot_interact_basic_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('gl3d plots', function() {
var gd;

beforeEach(function() {
gd =createGraphDiv();
gd = createGraphDiv();
});

afterEach(function() {
Expand Down