1
0
Fork 0

feat(plugin-title): Added name of person to title output

This commit is contained in:
Joost De Cock 2020-03-08 11:10:38 +01:00
parent d3eb77b406
commit e301483988
3 changed files with 18 additions and 1 deletions

View file

@ -2,6 +2,8 @@ Unreleased:
date:
Added:
Changed:
plugin-title:
Added *for* to title output
Deprecated:
Fixed:
Removed:

View file

@ -294,10 +294,17 @@ cloneDescription: Recreate an exact copy, using the measurements of the original
furtherReading: Further reading
saveAsNewPattern: Save As New Pattern
saveAsNewPattern-txt: Copy this pattern and store it in your FreeSewing account
saveAsNewPattern-txt: Store (a copy of) this pattern in your FreeSewing account
exportPattern: Export pattern
printPattern: Print pattern
exportPattern-txt: Export a PDF suitable for your printer, or download this pattern in a variety of formats
editThing: 'Edit {thing}'
editPattern-txt: Load this pattern in the pattern editor
featureRequiresAccount: This feature requires a FreeSewing account
zoom: Zoom
zoom-txt: Switches between constraining the height or the width of the pattern to fit on your screen
savePattern-txt: Store this pattern in your FreeSewing account
comparePattern: Compare pattern
comparePattern-txt: Compare your pattern to a range a standard sizes to review possible fitting issues
recreatePattern: Recreate pattern
recreatePattern-txt: Choose a different person, then recreate this pattern for that person

View file

@ -49,6 +49,14 @@ export default {
.attr('data-text', 'v' + this.context.config.version)
.attr('data-text-class', 'title-pattern fill-note')
.attr('data-text-transform', transform(so.at.shift(-90 - so.rotation, shift * so.scale)))
if (this.context.settings.metadata && this.context.settings.metadata.for) {
shift += 8
this.points[`_${prefix}_titleFor`] = so.at
.shift(-90 - so.rotation, shift * so.scale)
.attr('data-text', '( ' + this.context.settings.metadata.for + ' )')
.attr('data-text-class', 'title-pattern')
.attr('data-text-transform', transform(so.at.shift(-90 - so.rotation, shift * so.scale)))
}
}
}
}