Skip to content

Commit

Permalink
remove obsolete 'line' relinkColorAttrs block
Browse files Browse the repository at this point in the history
- 'line' is now declared within _module.colorbar, so
  we don't need this block
- add scatter3d test for good measure
  • Loading branch information
etpinard committed Apr 24, 2019
1 parent eb7fe0f commit 5e7ed27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 0 additions & 7 deletions src/components/colorscale/cross_trace_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,5 @@ module.exports = function crossTraceDefaults(fullData) {
});
}

if(hasColorscale(trace, 'line')) {
relinkColorAtts(trace, {
container: 'line',
min: 'cmin',
max: 'cmax'
});
}
}
};
7 changes: 6 additions & 1 deletion test/jasmine/tests/colorscale_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,11 +910,14 @@ describe('Test colorscale restyle calls:', function() {
x: [1, 2, 3],
y: [1, 2, 3],
z: [1, 2, 1],
marker: {color: [1, 2, 1], showscale: true}
marker: {color: [1, 2, 1], showscale: true},
line: {color: [2, 3, 4], showscale: true}
}])
.then(function() {
expect(gd._fullData[0].marker.cmin).toBe(1);
expect(gd._fullData[0].marker.cmax).toBe(2);
expect(gd._fullData[0].line.cmin).toBe(2);
expect(gd._fullData[0].line.cmax).toBe(4);
})
.then(function() {
// some non-calc edit
Expand All @@ -923,6 +926,8 @@ describe('Test colorscale restyle calls:', function() {
.then(function() {
expect(gd._fullData[0].marker.cmin).toBe(1);
expect(gd._fullData[0].marker.cmax).toBe(2);
expect(gd._fullData[0].line.cmin).toBe(2);
expect(gd._fullData[0].line.cmax).toBe(4);
})
.catch(failTest)
.then(done);
Expand Down

0 comments on commit 5e7ed27

Please sign in to comment.