Skip to content

Commit 5e7ed27

Browse files
committed
remove obsolete 'line' relinkColorAttrs block
- 'line' is now declared within _module.colorbar, so we don't need this block - add scatter3d test for good measure
1 parent eb7fe0f commit 5e7ed27

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/components/colorscale/cross_trace_defaults.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,5 @@ module.exports = function crossTraceDefaults(fullData) {
6565
});
6666
}
6767

68-
if(hasColorscale(trace, 'line')) {
69-
relinkColorAtts(trace, {
70-
container: 'line',
71-
min: 'cmin',
72-
max: 'cmax'
73-
});
74-
}
7568
}
7669
};

test/jasmine/tests/colorscale_test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,11 +910,14 @@ describe('Test colorscale restyle calls:', function() {
910910
x: [1, 2, 3],
911911
y: [1, 2, 3],
912912
z: [1, 2, 1],
913-
marker: {color: [1, 2, 1], showscale: true}
913+
marker: {color: [1, 2, 1], showscale: true},
914+
line: {color: [2, 3, 4], showscale: true}
914915
}])
915916
.then(function() {
916917
expect(gd._fullData[0].marker.cmin).toBe(1);
917918
expect(gd._fullData[0].marker.cmax).toBe(2);
919+
expect(gd._fullData[0].line.cmin).toBe(2);
920+
expect(gd._fullData[0].line.cmax).toBe(4);
918921
})
919922
.then(function() {
920923
// some non-calc edit
@@ -923,6 +926,8 @@ describe('Test colorscale restyle calls:', function() {
923926
.then(function() {
924927
expect(gd._fullData[0].marker.cmin).toBe(1);
925928
expect(gd._fullData[0].marker.cmax).toBe(2);
929+
expect(gd._fullData[0].line.cmin).toBe(2);
930+
expect(gd._fullData[0].line.cmax).toBe(4);
926931
})
927932
.catch(failTest)
928933
.then(done);

0 commit comments

Comments
 (0)