Skip to content

Commit 13324e2

Browse files
committed
clean up function now that alpha is not used directly
1 parent b4781d7 commit 13324e2

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/lib/gl_format_color.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,11 @@ function formatColor(containerIn, opacityIn, len) {
7676
return colorOut;
7777
}
7878

79-
function parseColorScale(cont, alpha) {
80-
if(alpha === undefined) alpha = 1;
81-
79+
function parseColorScale(cont) {
8280
var cOpts = Colorscale.extractOpts(cont);
8381

84-
var colorscale = cOpts.reversescale ?
85-
Colorscale.flipScale(cOpts.colorscale) :
86-
cOpts.colorscale;
82+
var colorscale = cOpts.colorscale;
83+
if(cOpts.reversescale) colorscale = Colorscale.flipScale(cOpts.colorscale);
8784

8885
return colorscale.map(function(elem) {
8986
var index = elem[0];

src/traces/surface/convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ proto.update = function(data) {
434434
var sceneLayout = scene.fullSceneLayout;
435435
var surface = this.surface;
436436
var alpha = data.opacity;
437-
var colormap = parseColorScale(data, alpha);
437+
var colormap = parseColorScale(data);
438438
var scaleFactor = scene.dataScale;
439439
var xlen = data.z[0].length;
440440
var ylen = data._ylength;

0 commit comments

Comments
 (0)