Show numeric sub-variation edge values as bare numbers
Numeric dependsOn values (merge-type variations) are RFC edge values, not ATTR names. Display them as the number, not as "ATTR: N" or "subvariation N".
This commit is contained in:
@@ -15,12 +15,13 @@ function shortView(node) {
|
||||
};
|
||||
case 'instrument':
|
||||
return { typeTag: 'instrument', label: node.name, meta: [] };
|
||||
case 'variation':
|
||||
return {
|
||||
typeTag: 'variation',
|
||||
label: node.dependsOn ? `ATTR: ${node.dependsOn}` : '(root variation)',
|
||||
meta: [],
|
||||
};
|
||||
case 'variation': {
|
||||
const dep = node.dependsOn;
|
||||
const label = dep == null ? '(root variation)'
|
||||
: isNaN(Number(dep)) ? `ATTR: ${dep}`
|
||||
: String(dep);
|
||||
return { typeTag: 'variation', label, meta: [] };
|
||||
}
|
||||
case 'label_spec':
|
||||
return { typeTag: 'label', label: node.label ?? '(no label)', meta: [] };
|
||||
case 'bar':
|
||||
|
||||
Reference in New Issue
Block a user