refactor: rename Offset.motifs to motifRefs

This commit is contained in:
c0dev0id
2026-07-06 21:11:55 +02:00
parent 7fb584d929
commit 3beaa1d2ec
3 changed files with 11 additions and 11 deletions

View File

@@ -470,14 +470,14 @@ function buildOffset(node) {
type: 'offset',
tick: node.props.tick,
stemNotes: [],
motifs: [],
motifRefs: [],
unknownProps: collectUnknownProps(node.props, new Set(['tick'])),
};
for (const child of node.children) {
if (child.parentSlot === 'line' && child.slot === 'stem_note')
offset.stemNotes.push(buildStemNote(child));
else if (child.parentSlot === 'line' && child.slot === 'motif')
offset.motifs.push({ label: child.positionals[0], chord: child.props.chord ?? null });
offset.motifRefs.push({ label: child.positionals[0], chord: child.props.chord ?? null });
}
return offset;
}

View File

@@ -251,8 +251,8 @@ export const PaneFO = {
fields: [
{ key: 'tick', value: node.tick, editable: false },
{ key: 'stem notes', value: node.stemNotes.map(snLabel).join(', ') || '—', editable: false },
node.motifs?.length
? { key: 'motifs', value: node.motifs.map(m => m.chord ? `${m.label}(${m.chord})` : m.label).join(', '), editable: false }
node.motifRefs?.length
? { key: 'motifRefs', value: node.motifRefs.map(m => m.chord ? `${m.label}(${m.chord})` : m.label).join(', '), editable: false }
: null,
...unknownPropFields(node),
].filter(Boolean),