corretti bug in vis struttura sint
This commit is contained in:
parent
4ccb789ac9
commit
e7ca33be4b
|
@ -724,7 +724,7 @@ function loadFrasi() {
|
|||
function resetFrasi(){
|
||||
|
||||
for (mk in dialogspeakers){
|
||||
console.log (mk+' '+dialogspeakers[mk])
|
||||
//console.log (mk+' '+dialogspeakers[mk])
|
||||
$(cantoDisplayed).find(' .'+dialogspeakers[mk]).each(function() {
|
||||
$(this).removeClass(dialogspeakers[mk]);
|
||||
})
|
||||
|
|
|
@ -45,7 +45,7 @@ document.addEventListener("dblclick", function(e){
|
|||
console.log('here graph '+lisid+' '+lsentid)
|
||||
|
||||
|
||||
main.redefine('width', 645);
|
||||
main.redefine('width', 625);
|
||||
main.redefine("lisid", lisid);
|
||||
const structel = document.getElementsByClassName(lsentid);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ function getFrasi(nfrase){
|
|||
var frase=item.frase
|
||||
var myval='';
|
||||
if (!usednodes.includes(mysrc.replace(/\s/g, '')) && nfrase.includes(frase)){
|
||||
console.log ('In sources, id : '+mysrc.replace(/\s/g, '')+' target: '+mytgt)
|
||||
//console.log ('In sources, id : '+mysrc.replace(/\s/g, '')+' target: '+mytgt)
|
||||
var myvis=item.visibile.trim();
|
||||
//if(myvis.indexOf('_v')==-1)
|
||||
// myvis=mysrc
|
||||
|
@ -52,7 +52,7 @@ function getFrasi(nfrase){
|
|||
usednodes.push(mysrc.replace(/\s/g, '').replaceAll("-",''))
|
||||
}
|
||||
if (!usednodes.includes(mytgt.replace(/\s/g, '')) && nfrase.includes(frase)){
|
||||
console.log ('In target, id : '+mysrc+' target: '+mytgt.replace(/\s/g, ''))
|
||||
//console.log ('In target, id : '+mysrc+' target: '+mytgt.replace(/\s/g, ''))
|
||||
mnode.push({
|
||||
"id" : mytgt,
|
||||
"type" : item.type,
|
||||
|
@ -672,7 +672,7 @@ function _sentenceStructArcs2(d3,DOM,width,margin,height,data_frasi,yScale,sente
|
|||
let start = yScale(idToNode[d.source].visible);
|
||||
let end = yScale(idToNode[d.target].visible);
|
||||
//console.log(start+' '+end)
|
||||
if (start==null)
|
||||
if (isNaN(start))
|
||||
return
|
||||
const arcPath = ['M', margin.left+405, start, 'A', Math.abs(start - end)/2, ',', Math.abs(start-end)/2, 0,0,",",
|
||||
start < end ? 1: 0, margin.left+405, end].join(' ');
|
||||
|
@ -994,7 +994,7 @@ function _sentenceStructArcs_new(d3,DOM,width,margin,sentenceheight,lisid,data_f
|
|||
let lor=true;
|
||||
let nodeoffset=4
|
||||
if (start < end && d.type.includes ('coord')){//.includes('coord')){
|
||||
console.log('here')
|
||||
//console.log('here')
|
||||
lor=false;
|
||||
nodeoffset=-4
|
||||
}
|
||||
|
@ -1106,7 +1106,7 @@ function _sentenceArcsStructs_new(d3,DOM,width,margin,sentenceheight,lisid,data_
|
|||
const radius = 4
|
||||
const sty=24
|
||||
const titleposy=15
|
||||
const titleposx=margin.lef-10 //100
|
||||
const titleposx=margin.left-5 //100
|
||||
const nodehpos=483
|
||||
const labelhpos=nodehpos-178
|
||||
const maxlabelwidth=40
|
||||
|
@ -1200,7 +1200,7 @@ function _sentenceArcsStructs_new(d3,DOM,width,margin,sentenceheight,lisid,data_
|
|||
let end = sty+yScale(idToNode[d.target].visible);
|
||||
let lor=true;
|
||||
let nodeoffset=4
|
||||
if (start==null)
|
||||
if (isNaN(start))
|
||||
return
|
||||
const arcPath = ['M', margin.left+nodehpos+nodeoffset, start, 'A', (Math.abs(start - end)/2), ',', Math.abs(start-end)/2, 0,0,",",
|
||||
lor ? 1: 0, margin.left+nodehpos+nodeoffset, end].join(' ');
|
||||
|
@ -1215,7 +1215,7 @@ function _sentenceArcsStructs_new(d3,DOM,width,margin,sentenceheight,lisid,data_
|
|||
let lor=true;
|
||||
let nodeoffset=4
|
||||
if (start < end && d.type.includes ('coord')){//.includes('coord')){
|
||||
console.log('here')
|
||||
//console.log('here')
|
||||
lor=false;
|
||||
nodeoffset=-4
|
||||
}
|
||||
|
@ -1434,7 +1434,7 @@ function _wrap_node_text(){return(
|
|||
}
|
||||
lines.push(line.join(" "));
|
||||
var htmllines=lines.join("")
|
||||
console.log(htmllines)
|
||||
//console.log(htmllines)
|
||||
return htmllines;
|
||||
}
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue