Skip to content

Commit

Permalink
Fix an issue with not including the annotation for psalm toned chants…
Browse files Browse the repository at this point in the history
… in PDF
  • Loading branch information
bbloomf committed Jul 25, 2023
1 parent 82aa211 commit 6a36a14
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions propers.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,22 @@ $(function(){
if(!LocationHash) return null;
return new LocationHash(location.hash);
}
function makeAnnotationArrayFromHeader(gabcHeader) {
if(gabcHeader.mode || gabcHeader['office-part']) {
var annotation;
if(gabcHeader['office-part']) annotation = partAbbrev[gabcHeader['office-part'].toLowerCase()];
if(annotation) {
if(annotation == 'V/.') {
return [annotation];
} else {
return [annotation, romanNumeral[gabcHeader.mode]];
}
} else if(gabcHeader.mode) {
return [romanNumeral[gabcHeader.mode]];
}
}
return
}
var gregobaseUrlPrefix = 'http://gregobase.selapa.net/chant.php?id=';
var $gradualeOptions = $('#selStyleGraduale>option').clone();
var $alleluiaOptions = $('#selStyleAlleluia>option').clone();
Expand Down Expand Up @@ -2090,6 +2106,13 @@ $(function(){
header.mode = mode;
delete header.annotationArray;
delete header.annotation;
var annotationArray = makeAnnotationArrayFromHeader(header);
if (annotationArray) {
if (annotationArray.length > 1) {
header.annotationArray = annotationArray;
}
header.annotation = annotationArray[0];
}

var useBigInitial = header.initialStyle != '0';
var originalClef = fullGabc.match(regexGabcClef);
Expand Down

0 comments on commit 6a36a14

Please sign in to comment.