Skip to content

Commit

Permalink
fix legend items of marker.colorscale traces
Browse files Browse the repository at this point in the history
... that don't use calcdata.mcc (that is: gl3d).
  • Loading branch information
etpinard committed Dec 17, 2018
1 parent 73c66a9 commit 175626b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,13 @@ lib.minExtend = function(obj1, obj2) {
v = obj1[k];
if(k.charAt(0) === '_' || typeof v === 'function') continue;
else if(k === 'module') objOut[k] = v;
else if(Array.isArray(v)) objOut[k] = v.slice(0, arrayLen);
else if(Array.isArray(v)) {
if(k === 'colorscale') {
objOut[k] = v.slice();
} else {
objOut[k] = v.slice(0, arrayLen);
}
}
else if(v && (typeof v === 'object')) objOut[k] = lib.minExtend(obj1[k], obj2[k]);
else objOut[k] = v;
}
Expand Down
Binary file modified test/image/baselines/gl3d_scatter-colorscale-marker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 175626b

@archmoj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great bug fix!

Please sign in to comment.