bugs risolti: parentesi colorate, messaggio quando grafo è rimosso

This commit is contained in:
cesare 2024-01-05 17:08:19 +01:00
parent c56e1162cf
commit bed9939d23
2 changed files with 27 additions and 2 deletions

View File

@ -722,6 +722,16 @@ function loadDialoghi() {
}
}
function loadFrasi() {
//rimuove le classi dei dialoghi
$(cantoDisplayed).find(' .diaDiretto').each(function() {
$(this).removeClass('diaDiretto');
})
$(cantoDisplayed).find(' .diaPensato').each(function() {
$(this).removeClass('diaPensato');
})
$(cantoDisplayed).find(' .diaSpeakable').each(function() {
$(this).removeClass('diaSpeakable');
})
$(cantoDisplayed).find(' .sentencetag').each(function() {
$(this).attr('style', 'display: d-flex;');

View File

@ -13,16 +13,30 @@ const runtime1 = new Runtime(new Library(name => {
}
}));
const emptyInfo = `<div class="card card-body well well-sm m-1 mt-2 p-0" id="infoCard0">
<span class="p-3 text-muted bg-lida-vis small" style="opacity: 0.6;">
Nessuna struttura visualizzata</span></div>`;
const defText = document.createTextNode('Nessuna struttura visualizzata');
var iDiv = document.createElement('div')
iDiv.className="card card-body well well-sm m-1 mt-2 p-0"
iDiv.setAttribute("id","infoCard0")
var iSpan=document.createElement('span')
iSpan.setAttribute('class', "p-3 text-muted bg-lida-vis small")
iSpan.setAttribute('style', "opacity: 0.6;")
iSpan.appendChild(defText)
iDiv.appendChild(iSpan);
document.addEventListener("dblclick", function(e){
const target = e.target.closest("."+formaClass);
if(target){
var periodograph=document.getElementById("periodograph");
if (periodograph!=null){
//console.log('val '+document.getElementById("periodograph").getAttribute('name'))
let showngr=document.getElementById("periodograph").getAttribute('name').split("_")
var tmpsent=showngr[0]+"_"+showngr[1]+"_s_"+showngr[2]
periodograph.parentNode.removeChild(periodograph);
@ -31,7 +45,7 @@ document.addEventListener("dblclick", function(e){
var sentence = document.getElementsByClassName(tmpsent);
for (let i = 0; i < sentence.length; i++) {
var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0]));
//var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0]));
sentence[i].classList.remove('font-italic');
if (selectedVista!='frasi' && !listaPeriodiRisultato.includes(tmpsent))
sentence[i].style.removeProperty('color');
@ -45,6 +59,7 @@ document.addEventListener("dblclick", function(e){
//$('#tab-list #vis0-tab').tab('show')
resetMinimap(tmpsent)
document.getElementById("displayinfo").appendChild(iDiv)
if (tmpsent==lsentid){
//showMinimap()