fix (banner) add text separately from spacers to allow for i18n during rendering
This commit is contained in:
parent
ccf2ff3931
commit
c147c6b652
2 changed files with 12 additions and 6 deletions
|
@ -12,8 +12,12 @@ export const bannerMacros = {
|
|||
}
|
||||
so.path.attr('data-text-dy', so.dy).attr('data-text-class', `${so.className} center`)
|
||||
const spacer = ' '.repeat(so.spaces)
|
||||
let banner = spacer
|
||||
for (let i = 0; i < so.repeat; i++) banner += so.text + ' '.repeat(so.spaces)
|
||||
so.path.attr('data-text', banner)
|
||||
|
||||
for (let i = 0; i < so.repeat; i++) {
|
||||
so.path.attr('data-text', spacer)
|
||||
so.path.attr('data-text', so.text)
|
||||
}
|
||||
|
||||
so.path.attr('data-text', spacer)
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue