grafi sintattici rimossi quando si cambia vista

This commit is contained in:
cesare 2023-04-11 11:00:35 +02:00
parent 3d5ba3b326
commit fb3e8008ad
1 changed files with 23 additions and 0 deletions

View File

@ -70,6 +70,17 @@ $("#valoreVista").on('change', function() {
$(cantoDisplayed).attr('style', 'display: d-flex;')
break;
case "frasi":
//cancello il grafo sintattico
var periodograph=document.getElementById("periodograph");
if (periodograph!=null){
let showngr=periodograph.getAttribute('name').split("_")
var tmpsent=showngr[0]+"_"+showngr[1]+"_s_"+showngr[2];
resetSentenceStructure(tmpsent)
shownSentenceList.delete(tmpsent)
//$("#periodograph").empty()
periodograph.parentNode.removeChild(periodograph);
}
loadFrasi();
break;
@ -663,6 +674,18 @@ function resetFrasi(){
}
}
//cancello il grafo sintattico
var periodograph=document.getElementById("periodograph");
if (periodograph!=null){
let showngr=periodograph.getAttribute('name').split("_")
var tmpsent=showngr[0]+"_"+showngr[1]+"_s_"+showngr[2];
resetSentenceStructure(tmpsent)
shownSentenceList.delete(tmpsent)
//$("#periodograph").empty()
periodograph.parentNode.removeChild(periodograph);
}
}
function getCantica(numeroCantica){