1
0
Fork 0

feat(plugin-title): Add support for title removal

This commit is contained in:
Joost De Cock 2022-07-10 16:04:58 +02:00
parent e32ea462db
commit df5c68f69d

View file

@ -14,6 +14,21 @@ export default {
},
macros: {
title: function (so) {
let prefix = ''
if (so.prefix) prefix = so.prefix
// Passing `false` will remove the title
if (so === false) {
for (const id of [
`_${prefix}_titleNr`,
`_${prefix}_titleName`,
`_${prefix}_titlePattern`,
`_${prefix}_titleFor`,
])
delete this.points[id]
return true
}
const transform = function (anchor) {
const cx = anchor.x - so.scale * anchor.x
const cy = anchor.y - so.scale * anchor.y