1
0
Fork 0

Port scalebox macro to use v3 data property.

This commit is contained in:
Benjamin F 2022-09-01 09:43:30 -07:00
parent 308268ead6
commit 1f5e3ef62f

View file

@ -153,9 +153,12 @@ export function scalebox(so) {
// Title
if (so.title) this.points.__scaleboxTitle.attributes.set('data-text', so.title)
else {
let name = this.context.config?.data?.name || 'No Name'
name = name.replace('@freesewing/', '')
this.points.__scaleboxTitle = this.points.__scaleboxTitle
.attr('data-text', this.context.config.name)
.attr('data-text', 'v' + this.context.config.version)
.attr('data-text', name)
.attr('data-text', 'v' +
this.context.config?.data?.version || 'No Version')
}
this.points.__scaleboxTitle.attributes.add('data-text-class', 'text-lg')
// Text