From bed9939d23a4ef1273df2cfe8d40c4df06cc2942 Mon Sep 17 00:00:00 2001 From: cesare Date: Fri, 5 Jan 2024 17:08:19 +0100 Subject: [PATCH] =?UTF-8?q?bugs=20risolti:=20parentesi=20colorate,=20messa?= =?UTF-8?q?ggio=20quando=20grafo=20=C3=A8=20rimosso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/cesareBrowse.js | 10 ++++++++++ js/syntgraph.js | 19 +++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 5394b1f..62ea2f2 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -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;'); diff --git a/js/syntgraph.js b/js/syntgraph.js index 185284d..38335e0 100644 --- a/js/syntgraph.js +++ b/js/syntgraph.js @@ -13,16 +13,30 @@ const runtime1 = new Runtime(new Library(name => { } })); +const emptyInfo = `
+ + Nessuna struttura visualizzata
`; +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()