From f2bf7d2240518d14a1dab3994bf1cf81e4af20f3 Mon Sep 17 00:00:00 2001 From: cesare Date: Wed, 8 Mar 2023 14:44:41 +0100 Subject: [PATCH] bug fixed per contesto risultato --- js/utils.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/utils.js b/js/utils.js index 240c50e..ecbbb5b 100644 --- a/js/utils.js +++ b/js/utils.js @@ -280,7 +280,10 @@ function getFormaContext(formaid, numversi=3) { var offset=0; - + if (parseInt(formaid) < 33373) { + offset=parseInt(formaid) + } + if (parseInt(formaid) > 33373 && parseInt(formaid) < 66588) { listaforme = formeseconda; cantica = 2; @@ -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