Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ddc2ebf

Browse filesBrowse files
committed
deferring the cell height change and defaultColor use for now
1 parent 239df86 commit ddc2ebf
Copy full SHA for ddc2ebf

File tree

2 files changed

+8
-7
lines changed
Filter options

2 files changed

+8
-7
lines changed

‎src/traces/table/defaults.js

Copy file name to clipboardExpand all lines: src/traces/table/defaults.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
4242
coerce('header.height');
4343
coerce('header.line.width');
4444
coerce('header.line.color');
45-
coerce('header.fill.color', defaultColor);
45+
coerce('header.fill.color');
4646
Lib.coerceFont(coerce, 'header.font', Lib.extendFlat({}, layout.font));
4747

4848
defaultColumnOrder(traceOut, coerce);
@@ -55,6 +55,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
5555
coerce('cells.height');
5656
coerce('cells.line.width');
5757
coerce('cells.line.color');
58-
coerce('cells.fill.color', defaultColor);
58+
coerce('cells.fill.color');
5959
Lib.coerceFont(coerce, 'cells.font', Lib.extendFlat({}, layout.font));
6060
};

‎test/jasmine/tests/table_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/table_test.js
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var Plotly = require('@lib/index');
22
var Lib = require('@src/lib');
33
var Plots = require('@src/plots/plots');
44
var Table = require('@src/traces/table');
5+
var attributes = require('@src/traces/table/attributes');
56
var cn = require('@src/traces/table/constants').cn;
67

78
var createGraphDiv = require('../assets/create_graph_div');
@@ -76,8 +77,8 @@ describe('table initialization tests', function() {
7677

7778
it('\'line\' specification should yield a default color', function() {
7879
var fullTrace = _supply({});
79-
expect(fullTrace.header.fill.color).toEqual('#777');
80-
expect(fullTrace.cells.fill.color).toEqual('#777');
80+
expect(fullTrace.header.fill.color).toEqual(attributes.header.fill.color.dflt);
81+
expect(fullTrace.cells.fill.color).toEqual(attributes.cells.fill.color.dflt);
8182
});
8283

8384
it('\'domain\' specification should have a default', function() {
@@ -108,17 +109,17 @@ describe('table initialization tests', function() {
108109
align: 'center',
109110
height: 28,
110111
line: { width: 1, color: 'grey' },
111-
fill: { color: '#777' },
112+
fill: { color: attributes.header.fill.color.dflt },
112113
font: {family: '"Open Sans", verdana, arial, sans-serif', size: 12, color: '#444'}
113114
});
114115

115116
expect(fullTrace.cells).toEqual({
116117
values: [1, 2],
117118
format: [],
118119
align: 'center',
119-
height: 28,
120+
height: 20,
120121
line: { width: 1, color: 'grey' },
121-
fill: { color: '#777' },
122+
fill: { color: attributes.cells.fill.color.dflt },
122123
font: {family: '"Open Sans", verdana, arial, sans-serif', size: 12, color: '#444'}
123124
});
124125
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.