feat(plugin-title): Add support for title removal
This commit is contained in:
parent
e32ea462db
commit
df5c68f69d
1 changed files with 15 additions and 0 deletions
|
@ -14,6 +14,21 @@ export default {
|
||||||
},
|
},
|
||||||
macros: {
|
macros: {
|
||||||
title: function (so) {
|
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 transform = function (anchor) {
|
||||||
const cx = anchor.x - so.scale * anchor.x
|
const cx = anchor.x - so.scale * anchor.x
|
||||||
const cy = anchor.y - so.scale * anchor.y
|
const cy = anchor.y - so.scale * anchor.y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue