feat: allow hashtab #override labels in note text
This commit is contained in:
parent
7abc9a0426
commit
4caa57bf6d
1 changed files with 4 additions and 0 deletions
|
|
@ -454,6 +454,7 @@ CAM.init = function(kiri, api) {
|
||||||
currentIndex = isIndexed && !isPreview ? index * DEG2RAD : 0;
|
currentIndex = isIndexed && !isPreview ? index * DEG2RAD : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// (re)render thea re-orderable op list
|
||||||
api.event.on("cam.op.render", func.opRender = () => {
|
api.event.on("cam.op.render", func.opRender = () => {
|
||||||
let oplist = current.process.ops;
|
let oplist = current.process.ops;
|
||||||
if (!(isCamMode && oplist)) {
|
if (!(isCamMode && oplist)) {
|
||||||
|
|
@ -470,6 +471,8 @@ CAM.init = function(kiri, api) {
|
||||||
let clock = rec.type === '|';
|
let clock = rec.type === '|';
|
||||||
let label = clock ? `<i class="fa-regular fa-clock"></i>` : rec.type;
|
let label = clock ? `<i class="fa-regular fa-clock"></i>` : rec.type;
|
||||||
let clazz = notime ? [ "draggable", "notime" ] : [ "draggable" ];
|
let clazz = notime ? [ "draggable", "notime" ] : [ "draggable" ];
|
||||||
|
let notable = rec.note?.split(' ').filter(v => v.charAt(0) === '#');
|
||||||
|
if (notable?.length) label = notable[0].slice(1);
|
||||||
html.appendAll([
|
html.appendAll([
|
||||||
`<div id="${mark+i}" class="${clazz.join(' ')}">`,
|
`<div id="${mark+i}" class="${clazz.join(' ')}">`,
|
||||||
`<label class="label">${label}</label>`,
|
`<label class="label">${label}</label>`,
|
||||||
|
|
@ -1677,6 +1680,7 @@ function createPopOp(type, map) {
|
||||||
$(noteid).innerText = poppedRec.note = note;
|
$(noteid).innerText = poppedRec.note = note;
|
||||||
API.conf.save();
|
API.conf.save();
|
||||||
}
|
}
|
||||||
|
func.opRender();
|
||||||
};
|
};
|
||||||
const note = $(noteid);
|
const note = $(noteid);
|
||||||
if (note) note.innerText = poppedRec.note || '';
|
if (note) note.innerText = poppedRec.note || '';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue