Fixing label rendering for repetition
Rendering a text element with a string leads to just a <text/> element. Rendering with an array leads to <text><tspan/></text>. Decided to use the latter since it matches with the majority of text rendering currently in use.
This commit is contained in:
parent
4169720eb2
commit
6c9f5d4cb6
@ -163,7 +163,7 @@ describe('parser/javascript/match_fragment.js', function() {
|
||||
|
||||
it('renders a text element', function() {
|
||||
this.node.loopLabel();
|
||||
expect(this.node.container.text).toHaveBeenCalledWith(0, 0, 'example label');
|
||||
expect(this.node.container.text).toHaveBeenCalledWith(0, 0, ['example label']);
|
||||
});
|
||||
|
||||
describe('when there is a skip loop', function() {
|
||||
|
@ -56,7 +56,7 @@ export default {
|
||||
label, labelBox, box;
|
||||
|
||||
if (labelStr) {
|
||||
label = this.container.text(0, 0, labelStr)
|
||||
label = this.container.text(0, 0, [labelStr])
|
||||
.addClass('repeat-label');
|
||||
|
||||
box = this.getBBox();
|
||||
|
Loading…
Reference in New Issue
Block a user