gestione grafi, cancellazione in progress
This commit is contained in:
parent
2ac0565027
commit
fb1e732cca
|
@ -13,30 +13,16 @@ 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);
|
||||
|
@ -59,7 +45,8 @@ document.addEventListener("dblclick", function(e){
|
|||
//$('#tab-list #vis0-tab').tab('show')
|
||||
resetMinimap(tmpsent)
|
||||
|
||||
document.getElementById("displayinfo").appendChild(iDiv)
|
||||
emptyStructCard()
|
||||
|
||||
if (tmpsent==lsentid){
|
||||
|
||||
//showMinimap()
|
||||
|
@ -68,11 +55,18 @@ document.addEventListener("dblclick", function(e){
|
|||
}
|
||||
|
||||
}
|
||||
var hcontainer="#structCard0"
|
||||
|
||||
var main=runtime1.module(commarc, name => {
|
||||
|
||||
if (name === "sentenceStructArcs_new") {
|
||||
return new Inspector(document.querySelector("#displayinfo"));
|
||||
const structel = document.getElementsByClassName(lsentid);
|
||||
console.log(structel[0].parentNode.getAttribute('value'))
|
||||
var stid=lsentid.split('_')
|
||||
var structid=stid[0]+'_'+stid[1]+'_'+structel[0].parentNode.getAttribute('value')
|
||||
console.log(structid)
|
||||
fillStructCard(structid);
|
||||
return new Inspector(document.querySelector(hcontainer));
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -84,8 +78,17 @@ document.addEventListener("dblclick", function(e){
|
|||
var mywidth=document.getElementById('displaycanto').offsetWidth
|
||||
|
||||
console.log('here graph '+lisid+' '+lsentid)
|
||||
var structContainer=document.getElementById("structCard0");
|
||||
|
||||
|
||||
main.redefine('width', 645);
|
||||
main.redefine("lisid", lisid);
|
||||
const structel = document.getElementsByClassName(lsentid);
|
||||
|
||||
var stid=lsentid.split('_')
|
||||
var structid=stid[0]+'_'+stid[1]+'_'+structel[0].parentNode.getAttribute('value')
|
||||
|
||||
fillStructCard(structid)
|
||||
var collection = document.getElementsByClassName(lsentid);
|
||||
for (let i = 0; i < collection.length; i++) {
|
||||
//collection[i].classList.add('font-weight-normal');
|
||||
|
|
Loading…
Reference in New Issue