bug fixed per contesto risultato

This commit is contained in:
cesare 2023-03-08 14:44:41 +01:00
parent 95cd519233
commit f2bf7d2240
1 changed files with 7 additions and 3 deletions

View File

@ -280,6 +280,9 @@ function getFormaContext(formaid, numversi=3) {
var offset=0;
if (parseInt(formaid) < 33373) {
offset=parseInt(formaid)
}
if (parseInt(formaid) > 33373 && parseInt(formaid) < 66588) {
listaforme = formeseconda;
@ -301,13 +304,14 @@ function getFormaContext(formaid, numversi=3) {
maxpos = listaforme.length - 1
var pos = 0
const startindex=Math.max(0, (offset-1))
var startindex=Math.max(0, (offset-45))
console.log('Forma id: '+formaid+' startindex '+ startindex+' offset '+offset+' ('+cantica+')')
for (i=startindex; i<listaforme.length; i++){
var tmpos=listaforme[i].split('_')[2]
if (tmpos==formaid){
pos=i;
console.log(pos+', '+formaid)
console.log(' in pos: '+pos)
break;
}
}