aggiunte <<>> per dialoghi, da completare

This commit is contained in:
cesare 2024-01-24 16:17:13 +01:00
parent 740de4aa51
commit bb913e3f48
2 changed files with 25 additions and 14 deletions

View File

@ -1457,17 +1457,18 @@ function resetFrasi(){
//var commNumber = numberOfComments(idCommento); //var commNumber = numberOfComments(idCommento);
var commNumber=numberOfCommentsJson(idCommento) var commNumber=numberOfCommentsJson(idCommento)
//if (hasComments(idCommento)){
if (commNumber>0){
createCommentSpan(idCommento, elverso, commNumber)
//console.log("Numero commenti: "+commNumber)
}
if(currSentenceId!=null && currSentenceId != sentenceid){ if(currSentenceId!=null && currSentenceId != sentenceid){
createSpanPeriodiTag(closeSTag, 'c', formaItem[2]-1, currSentenceId, elverso, periodinum[currSentenceId]) createSpanPeriodiTag(closeSTag, 'c', formaItem[2]-1, currSentenceId, elverso, periodinum[currSentenceId])
currSentenceId=null currSentenceId=null
} }
if (commNumber>0){
createCommentSpan(idCommento, elverso, commNumber)
//console.log("Numero commenti: "+commNumber)
}
//elverso=createDivVersoNew(cantica, formaItem[3], 'Canto_' + formaItem[1]) //elverso=createDivVersoNew(cantica, formaItem[3], 'Canto_' + formaItem[1])
elverso=createDivVersoLI(cantica, formaItem[3], 'Canto_' + formaItem[1]) elverso=createDivVersoLI(cantica, formaItem[3], 'Canto_' + formaItem[1])
setVersiCanto.add(cantica+ "_" + formaItem[3] + "_" + 'Canto_' + formaItem[1]) setVersiCanto.add(cantica+ "_" + formaItem[3] + "_" + 'Canto_' + formaItem[1])
@ -1551,24 +1552,34 @@ function resetFrasi(){
spanoccorrenza.append(separator+" ") spanoccorrenza.append(separator+" ")
if (separator==closeSTag){ if (separator==closeSTag){
/*
//aggiunge il nome del 'parlante', NON SERVE RIMUOVERE //aggiunge simbolo di chiusura dialogo
for (const india in dialoghi){ for (const india in dialoghi){
if (dialoghi[india]['Cnt'].replace('_so','')==sentenceid){ if (dialoghi[india]['Cnt'].replace('_so','')==sentenceid){
var supelname=$('<sup />') var enddiscorso=$('<span />')
supelname.append("("+dialoghi[india]['Spna'].replace('http://dantenetwork.it/data/commedia/', '')+') ') enddiscorso.append('&raquo;&nbsp;')
supelname.attr('class', sentenceid+'_so autoredialogotag') enddiscorso.appendTo(elementoverso)
supelname.css("display", "none")
supelname.appendTo(elementoverso)
break; break;
} }
} }
*/
varsupel=$('<sup />') varsupel=$('<sup />')
//varsupel.append(sentenceid.split('_')[3]+' ') //varsupel.append(sentenceid.split('_')[3]+' ')
varsupel.append(pnum+' ') varsupel.append(pnum+' ')
varsupel.appendTo(spanoccorrenza) varsupel.appendTo(spanoccorrenza)
} }
if (separator==openSTag){
//aggiunge simbolo di apertura dialogo
for (const india in dialoghi){
if (dialoghi[india]['Cnt'].replace('_so','')==sentenceid){
var enddiscorso=$('<span />')
enddiscorso.append('&laquo;&nbsp;')
enddiscorso.appendTo(elementoverso)
break;
}
}
}
spanoccorrenza.css("display", "none") spanoccorrenza.css("display", "none")
spanoccorrenza.appendTo(elementoverso) spanoccorrenza.appendTo(elementoverso)

View File

@ -1257,7 +1257,7 @@ function _sentenceArcsStructs_new(d3,DOM,width,margin,sentenceheight,lisid,data_
//.attr("y", d => yScale(d.visible)) //.attr("y", d => yScale(d.visible))
.attr("dominant-baseline", "middle") .attr("dominant-baseline", "middle")
.attr("y", d=>sty+ yScale(d.visible)+syntfunctype(d.visible)) .attr("y", d=>sty+ yScale(d.visible)+syntfunctype(d.visible))
.attr("class","synt__info") .attr("class","synt__info")
.style("text-anchor", "start") .style("text-anchor", "start")
.text(d => d.visible) .text(d => d.visible)