Skip to content

Commit 175626b

Browse files
committed
fix legend items of marker.colorscale traces
... that don't use calcdata.mcc (that is: gl3d).
1 parent 73c66a9 commit 175626b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/lib/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,13 @@ lib.minExtend = function(obj1, obj2) {
644644
v = obj1[k];
645645
if(k.charAt(0) === '_' || typeof v === 'function') continue;
646646
else if(k === 'module') objOut[k] = v;
647-
else if(Array.isArray(v)) objOut[k] = v.slice(0, arrayLen);
647+
else if(Array.isArray(v)) {
648+
if(k === 'colorscale') {
649+
objOut[k] = v.slice();
650+
} else {
651+
objOut[k] = v.slice(0, arrayLen);
652+
}
653+
}
648654
else if(v && (typeof v === 'object')) objOut[k] = lib.minExtend(obj1[k], obj2[k]);
649655
else objOut[k] = v;
650656
}
Loading

0 commit comments

Comments
 (0)