Skip to content

Commit 2405ba4

Browse files
committed
revisit pathbar divider default
1 parent 0cf5bf6 commit 2405ba4

File tree

5 files changed

+5
-16
lines changed

5 files changed

+5
-16
lines changed

src/traces/treemap/attributes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,11 @@ module.exports = {
211211
'/',
212212
'\\'
213213
],
214+
dflt: '>',
214215
role: 'style',
215216
editType: 'plot',
216217
description: [
217-
'Determines which divider is used between labels.',
218-
'With *top* `pathbar.side` it is defaulted to */*; and',
219-
'with *bottom* `pathbar.side` it is defaulted to *\\*.'
218+
'Determines which divider is used between labels.'
220219
].join(' ')
221220
},
222221

src/traces/treemap/defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
105105
// This works even for multi-line labels as treemap pathbar trim out line breaks
106106
coerce('pathbar.thickness', traceOut.pathbar.textfont.size + 2 * TEXTPAD);
107107

108-
var side = coerce('pathbar.side');
109-
coerce('pathbar.divider', side === 'top' ? '/' : '\\');
108+
coerce('pathbar.side');
109+
coerce('pathbar.divider');
110110
}
111111

112112
handleDomainDefaults(traceOut, layout, coerce);
-6 Bytes
Loading
-127 Bytes
Loading

test/jasmine/tests/treemap_test.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ describe('Test treemap defaults:', function() {
253253
expect(fullData[0].pathbar.textfont.size).toBe(12);
254254
expect(fullData[0].pathbar.thickness).toBe(18);
255255
expect(fullData[0].pathbar.side).toBe('top');
256-
expect(fullData[0].pathbar.divider).toBe('/');
256+
expect(fullData[0].pathbar.divider).toBe('>');
257257
});
258258

259259
it('should default *pathbar* sizes and styles to layout', function() {
@@ -268,16 +268,6 @@ describe('Test treemap defaults:', function() {
268268
expect(fullData[0].pathbar.textfont.size).toBe(24);
269269
expect(fullData[0].pathbar.thickness).toBe(30);
270270
});
271-
272-
it('should default *pathbar.divider* in respect to *path.side*', function() {
273-
_supply([
274-
{labels: [1], parents: [''], pathbar: {side: 'top'}},
275-
{labels: [1], parents: [''], pathbar: {side: 'bottom'}}
276-
]);
277-
278-
expect(fullData[0].pathbar.divider).toBe('/', 'when path.barside is top');
279-
expect(fullData[1].pathbar.divider).toBe('\\', 'when path.barside is bottom');
280-
});
281271
});
282272

283273
describe('Test treemap calc:', function() {

0 commit comments

Comments
 (0)