From f29ec6f7069499350bf8b1df5f653d192febf1ba Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 17 May 2016 18:12:32 +0200 Subject: [PATCH] #fi-51 PR feedback --- src/traces/contourgl/convert.js | 9 +++++---- test/jasmine/tests/gl2d_scatterplot_contour_test.js | 2 +- test/jasmine/tests/gl_plot_interact_basic_test.js | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/traces/contourgl/convert.js b/src/traces/contourgl/convert.js index 9d039c709aa..5abb76dbb55 100644 --- a/src/traces/contourgl/convert.js +++ b/src/traces/contourgl/convert.js @@ -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 @@ -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; } @@ -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); diff --git a/test/jasmine/tests/gl2d_scatterplot_contour_test.js b/test/jasmine/tests/gl2d_scatterplot_contour_test.js index 50d903d4722..9511141c982 100644 --- a/test/jasmine/tests/gl2d_scatterplot_contour_test.js +++ b/test/jasmine/tests/gl2d_scatterplot_contour_test.js @@ -172,7 +172,7 @@ describe('contourgl plots', function() { var gd; beforeEach(function() { - gd =createGraphDiv(); + gd = createGraphDiv(); }); afterEach(function() { diff --git a/test/jasmine/tests/gl_plot_interact_basic_test.js b/test/jasmine/tests/gl_plot_interact_basic_test.js index d094fab5498..0397084d1a6 100644 --- a/test/jasmine/tests/gl_plot_interact_basic_test.js +++ b/test/jasmine/tests/gl_plot_interact_basic_test.js @@ -61,7 +61,7 @@ describe('gl3d plots', function() { var gd; beforeEach(function() { - gd =createGraphDiv(); + gd = createGraphDiv(); }); afterEach(function() {