refactor: rename Offset.motifs to motifRefs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user