From 822dcb0fcbca0a1c0facd300d8d8fcb4b0f8e03b Mon Sep 17 00:00:00 2001 From: cesare Date: Mon, 27 Feb 2023 09:03:20 +0100 Subject: [PATCH] allineamento num versi, minimap per lista risultati --- js/cesareBrowse.js | 20 ++++++++++++++----- .../commarcdiag/d019e1db56ab1d8c@1159.js | 3 ++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 71f8529..59e63ec 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -370,6 +370,7 @@ $(" ."+formaClass).hover(function(idx, element) { if (!queryExecuted){ $("#vistaFrasi").attr('style', 'display: d-flex;'); + manageMM("#vistaFrasi") $(cantoDisplayed).css("display", "none"); return } @@ -453,6 +454,7 @@ $(" ."+formaClass).hover(function(idx, element) { //visualizzo $("#vistaFrasi").attr('style', 'display: d-flex;'); + manageMM("#vistaFrasi") }); @@ -767,8 +769,8 @@ $(" ."+formaClass).hover(function(idx, element) { createSpanPeriodiTag(closeSTag, 'c', formaItem[2]-1, currSentenceId, elverso) currSentenceId=null } - elverso=createDivVersoNew(cantica, formaItem[3], 'Canto_' + formaItem[1]) - //elverso=createDivVersoLI(cantica, formaItem[3], 'Canto_' + formaItem[1]) + //elverso=createDivVersoNew(cantica, formaItem[3], 'Canto_' + formaItem[1]) + elverso=createDivVersoLI(cantica, formaItem[3], 'Canto_' + formaItem[1]) setVersiCanto.add(cantica+ "_" + formaItem[3] + "_" + 'Canto_' + formaItem[1]) } if(currSentenceId==null || currSentenceId != sentenceid){ @@ -849,13 +851,21 @@ $(" ."+formaClass).hover(function(idx, element) { } function createDivVersoGenericLi(cantica, num, canto) { - //let digits=num.length + let digits=num.length + var spannum=$('') + + if (digits==1) + spannum.append('\xa0\xa0') + if (digits==2) + spannum.append('\xa0') + spannum.append(num+'. ') var elementoverso = $('
  • ') - + //var elementoverso=$('

    ') + //elementoverso.append(spannum) elementoverso.attr("value", num) - elementoverso.attr("style", "line-height: 1.0em") + //elementoverso.attr("style", "line-height: 1.0em") elementoverso.attr('class', 'f6 mb-1 text-muted text-nowrap font-weight-lighter ')//+cantica+' '+canto) //elementoverso.attr('class', 'text-nowrap ')//+cantica+' '+canto) diff --git a/node_modules/commarcdiag/d019e1db56ab1d8c@1159.js b/node_modules/commarcdiag/d019e1db56ab1d8c@1159.js index bde0125..6439784 100644 --- a/node_modules/commarcdiag/d019e1db56ab1d8c@1159.js +++ b/node_modules/commarcdiag/d019e1db56ab1d8c@1159.js @@ -885,7 +885,8 @@ function _wrap_text_nchar(wrap_text_array){return( if (!line_height) line_height = 1.0; if (text_element.text().length>150) line_height = 0.8 - if (text_element.text().includes("ordinata") || text_element.text().includes("parentetica")){ + if (text_element.text().includes("ordinata") || text_element.text().includes("parentetica") + || text_element.text().includes("rincipale")){ max_width=30 if (text_element.text().length>90) line_height = 0.8