From e19c15992db1ee01fba9d80e8394e39cc01a703f Mon Sep 17 00:00:00 2001
From: cesare <cesare@cesares-mbp-2>
Date: Mon, 15 Jan 2024 12:14:49 +0100
Subject: [PATCH] vari bug corretti

---
 css/custom2_4.3.css                               | 10 ++--------
 js/cesareBrowse.js                                | 10 ++++++----
 js/utils.js                                       |  8 +++++++-
 node_modules/commarcdiag/d019e1db56ab1d8c@1540.js | 11 ++++++-----
 4 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/css/custom2_4.3.css b/css/custom2_4.3.css
index f0156ab..c9f4576 100644
--- a/css/custom2_4.3.css
+++ b/css/custom2_4.3.css
@@ -196,9 +196,9 @@ Ex browsingldc.css
 }
 
 .synt__info{
- 	font-size: 15px;
+ 	font-size: 16px;
  	font-weight: normal;
- 	font-style: normal;
+ 	font-style: italic;
  	font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif;
  	letter-spacing: 0.5px;
 }
@@ -209,12 +209,6 @@ Ex browsingldc.css
    	    font-family: 'Humanist-777', 'Roboto';
    	    letter-spacing: 0.4px;
 }
-
-.synt__label{
-   	    font-size: 16px;
-   	    font-weight: bold;
-   	    font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif;
-}
       
 .numverso {
 	font-size: 12px;
diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js
index 54a768e..6784d61 100644
--- a/js/cesareBrowse.js
+++ b/js/cesareBrowse.js
@@ -1269,8 +1269,8 @@ function resetFrasi(){
 		if(selectedVista=='dialoghi'){
 			for (const india in dialoghi){
 				if (dialoghi[india]['Cnt'].replace('_so','')==sentId){
-					discorsost="<div class='ttContentPers'><b>Personaggio:</b> "+dialoghi[india]['Spna'].replace('http://dantenetwork.it/data/commedia/', '')
-								+'<br><b>Discorso:</b> '+TipiDiscorso[dialoghi[india]['Dty']]+'</div>'
+					discorsost="<div class='ttContentPers'><b>Personaggio:</b> <i>"+dialoghi[india]['Spna'].replace('http://dantenetwork.it/data/commedia/', '')+'</i>'
+								+'<br><b>Discorso:</b> <i>'+TipiDiscorso[dialoghi[india]['Dty']]+'</i></div>'
 					break;
 				}	
 			}
@@ -1771,13 +1771,15 @@ function resetFrasi(){
 							//if (!resSent.has(fraseItems[0] + '-' + fraseItems[3])) {
 							let tmpocc=fraseItems.slice(-1)
 							
-							if (resClauses.filter(clocc => clocc==tmpocc[0]).length==0) {							
+							if (resClauses.filter(clocc => clocc==tmpocc[0]).length==0) {	
+														
 								resClauses.push(tmpocc[0]);
 								//resSent.add(fraseItems[0] + '-' + fraseItems[3]+'-'+fraseItems[1] + '-' + fraseItems[2]);
 								resSentence.add(fraseItems[1] + '-' + fraseItems[2]);
 								//resSent.add(fraseItems.slice(-1))
 								resultsInCantica.push(fraseItems[4]);
-								resultsInCanto.push(fraseItems[4] + fraseItems[5]);								
+								resultsInCanto.push(fraseItems[4] + fraseItems[5]);
+															
 							}	
 						}
 						listaClausoleRisultato=Array.from(resSent);
diff --git a/js/utils.js b/js/utils.js
index 59f6bab..94b4334 100644
--- a/js/utils.js
+++ b/js/utils.js
@@ -136,11 +136,14 @@ PREFIX orl: <https://dantenetwork.it/ontology/orl/current/>
 PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
 PREFIX olires: <https://dantenetwork.it/ontology/olires/current/>
 PREFIX syntit: <https://dantenetwork.it/ontology/syntit/current/>
-SELECT ?sentence  ?clocc ?clfr ?clto  ?clafunction ?clatype (?t_canto as ?Canto) (?t_cantica as ?Cantica)
+SELECT DISTINCT ?sentence  ?clocc ?clfr ?clto  ?clafunction ?clatype (?t_canto as ?Canto) (?t_cantica as ?Cantica)
 WHERE {
   FILTER regex(?Rappresentazione,"^persona$","i") . #remove if query_text==''
   FILTER langMatches(lang(?Rappresentazione),"it") #remove if query_text==''
   ?cat ontolex:writtenRep ?Rappresentazione . #remove if query_text==''
+  ?lent ontolex:lexicalForm ?cat; #remove if query_text==''
+      ontolex:canonicalForm ?cf. #remove if query_text==''
+  ?cf ontolex:writtenRep ?lm. #remove if query_text==''
   ?fa orl:occurrenceOf ?cat . #remove if query_text==''
   ?clocc ecrm:P148_has_component ?fa . #remove if query_text==''
   ?cl syntit:hasClauseType ?clatype;
@@ -620,6 +623,9 @@ function buildSintacticClause(clause, parsedquery, whereind) {
 			//remove the filter for text CHANGE!
 			parsedquery.where.splice(0, 1)
 		parsedquery.where.splice(0, 1)
+		parsedquery.where[0].triples.splice(5, 1)
+		parsedquery.where[0].triples.splice(4, 1)
+		parsedquery.where[0].triples.splice(3, 1)
 		parsedquery.where[0].triples.splice(2, 1)
 		parsedquery.where[0].triples.splice(1, 1)
 		parsedquery.where[0].triples.splice(0, 1)
diff --git a/node_modules/commarcdiag/d019e1db56ab1d8c@1540.js b/node_modules/commarcdiag/d019e1db56ab1d8c@1540.js
index 7edcd35..fbecd70 100644
--- a/node_modules/commarcdiag/d019e1db56ab1d8c@1540.js
+++ b/node_modules/commarcdiag/d019e1db56ab1d8c@1540.js
@@ -1120,7 +1120,8 @@ function _sentenceArcsStructs_new(d3,DOM,width,margin,sentenceheight,lisid,data_
     .attr("y", titleposy)
     .attr("text-anchor", "middle")
     .attr("alignment-baseline", "middle")
-    .attr("class","synt__label")
+    //.attr("class","text-warning")
+    .attr("font-family", 'inherit')
     .text("Frase");
 
   container
@@ -1129,8 +1130,9 @@ function _sentenceArcsStructs_new(d3,DOM,width,margin,sentenceheight,lisid,data_
     .attr("y", titleposy)
     .attr("text-anchor", "middle")
     .attr("alignment-baseline", "middle")
-    .attr("class","synt__label")
-    .text("Funzione e Tipo");
+    //.attr("class","synt__label")
+    .attr("font-family", 'inherit')
+    .text("Funzione e tipo");
   
  /*
   container.append("style").text(`
@@ -1254,7 +1256,6 @@ function _sentenceArcsStructs_new(d3,DOM,width,margin,sentenceheight,lisid,data_
       .attr("dominant-baseline", "middle")
       .attr("y", d=>sty+ yScale(d.visible)+syntfunctype(d.visible))
        .attr("class","synt__info")
-      //.style("font-style", "italic")
       .style("text-anchor", "start")
       .text(d => d.visible)
   
@@ -1355,7 +1356,7 @@ function _wrap_text_nchar(wrap_text_array){return(
   if (text_element.text().length>150)
     line_height = 0.8
   if (text_element.text().includes("ordinata") || text_element.text().includes("parentetica") || 
-      text_element.text().includes("principale")){
+      text_element.text().includes("principale") || text_element.text().includes("Principale")){
     max_width=30
     if (text_element.text().length>90)
       line_height = 0.9