sparkles: Support for prefix, and made title optional
This commit is contained in:
parent
9050fb6e9c
commit
f6568c4a9e
1 changed files with 13 additions and 7 deletions
|
@ -15,15 +15,21 @@ export default {
|
||||||
title: function(so) {
|
title: function(so) {
|
||||||
let overwrite = true;
|
let overwrite = true;
|
||||||
if (so.append) overwrite = false;
|
if (so.append) overwrite = false;
|
||||||
this.points._titleNr = so.at
|
let prefix = "";
|
||||||
|
if (so.prefix) prefix = so.prefix;
|
||||||
|
this.points[`_${prefix}_titleNr`] = so.at
|
||||||
.attr("data-text", so.nr, overwrite)
|
.attr("data-text", so.nr, overwrite)
|
||||||
.attr("data-text-class", "title-nr note fill-note");
|
.attr("data-text-class", "title-nr note fill-note");
|
||||||
this.points._titleName = so.at
|
let shift = 10;
|
||||||
.shift(-90, 13)
|
if (so.title && so.title !== "") {
|
||||||
.attr("data-text", so.title)
|
this.points[`_${prefix}_titleName`] = so.at
|
||||||
.attr("data-text-class", "title-name");
|
.shift(-90, 13)
|
||||||
this.points._titlePattern = so.at
|
.attr("data-text", so.title)
|
||||||
.shift(-90, 20)
|
.attr("data-text-class", "title-name");
|
||||||
|
shift += 10;
|
||||||
|
}
|
||||||
|
this.points[`_${prefix}_titlePattern`] = so.at
|
||||||
|
.shift(-90, shift)
|
||||||
.attr("data-text", this.context.config.name)
|
.attr("data-text", this.context.config.name)
|
||||||
.attr("data-text", "v" + this.context.config.version)
|
.attr("data-text", "v" + this.context.config.version)
|
||||||
.attr("data-text-class", "title-pattern fill-note");
|
.attr("data-text-class", "title-pattern fill-note");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue