diff --git a/js/syntgraph.js b/js/syntgraph.js index 626332a..f6dc018 100644 --- a/js/syntgraph.js +++ b/js/syntgraph.js @@ -26,17 +26,19 @@ document.addEventListener("dblclick", function(e){ let showngr=document.getElementById("periodograph").getAttribute('name').split("_") var tmpsent=showngr[0]+"_"+showngr[1]+"_s_"+showngr[2] periodograph.parentNode.removeChild(periodograph); + //var sentence = document.getElementsByClassName(lsentid); var sentence = document.getElementsByClassName(tmpsent); + for (let i = 0; i < sentence.length; i++) { + var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0])); sentence[i].classList.remove('font-italic'); - if (selectedVista!='frasi' && !listaPeriodiRisultato.includes(tmpsent)) + if (selectedVista!='frasi' && !listaPeriodiRisultato.includes(tmpsent) && !matches.length) sentence[i].style.removeProperty('color'); sentence[i].classList.remove('font-weight-normal'); } - var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0])); //console.log('matches for clausole '+matches) diff --git a/js/utils.js b/js/utils.js index db4b15e..9b10e22 100644 --- a/js/utils.js +++ b/js/utils.js @@ -574,7 +574,9 @@ function buildStatementClause(clause, parsedquery, whereind, theplace) { tmpgroup.patterns.at(-1).triples.push(myf) } if (typeS != null && typeS != ".+") { - let mymt=macrotipi_sint[typeS] + var alltipi = Object.assign(macrotipi_sint, tipi_sint); + let mymt=alltipi[typeS] + //let mymt=macrotipi_sint[typeS] if(listaMacroTipiConSubTipo.includes(mymt.split(':')[1])){ let myfa=buildMacroSyntType(mymt) for (fa in myfa){ @@ -583,7 +585,7 @@ function buildStatementClause(clause, parsedquery, whereind, theplace) { } } else{ - var tmptr=macrotipi_sint[typeS].split(';') + var tmptr=alltipi[typeS].split(';') for (indttr in tmptr){ myf = buildsyntClause(tmptr[indttr]) if (myf != '')