diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 59e63ec..7cbeb51 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -43,7 +43,7 @@ $(document).ready(function() { esprlogica = [] } - hideMinimap(); + //hideMinimap(); createAllDivCanti() //const start = performance.now(); showCanto(formeprima, '1','1') @@ -66,26 +66,15 @@ $("#valoreVista").on('change', function() { break; case "frasi": loadFrasi(); - $("#vistaDialoghi").css("display", "none"); - $("#vistaMetafore").css("display", "none"); - //$(cantoDisplayed).css("display", "none"); - //$("#vistaFrasi").attr('style', 'display: d-flex;'); + break; case "metafore": //loadMetafore(); - //$("#vistaDialoghi").css("display", "none"); - //$("#vistaFrasi").css("display", "none"); - //resetFrasi() - //$(cantoDisplayed).css("display", "none"); - //$("#vistaMetafore").attr('style', 'display: d-flex;'); + break; case "dialoghi": //loadDialoghi(); - //$("#vistaMetafore").css("display", "none"); - //$("#vistaFrasi").css("display", "none"); - //resetFrasi() - //$(cantoDisplayed).css("display", "none"); - //$("#vistaDialoghi").attr('style', 'display: d-flex;'); + break; } }); @@ -182,25 +171,6 @@ $(" ."+formaClass).hover(function(idx, element) { }); - - /* - - jQuery(document).delegate('#sentence', 'click', function(e) { - e.preventDefault(); - sentenceId=$(this).attr('class').split(' ')[0].replace('$','') - console.log(sentenceId) - if (shownSentenceList.has(sentenceId)){ - lisid='' - resetSentenceStructure(sentenceId) - shownSentenceList.delete(sentenceId) - } - else{ - //showSentenceStructure (sentenceId) - shownSentenceList.add(sentenceId) - } - - }); - */ //displayCantoWrapperId //$("#" + displayId).scroll(function() { @@ -455,6 +425,7 @@ $(" ."+formaClass).hover(function(idx, element) { //visualizzo $("#vistaFrasi").attr('style', 'display: d-flex;'); manageMM("#vistaFrasi") + cantoDisplayed = "#vistaFrasi"; }); @@ -501,16 +472,13 @@ $(" ."+formaClass).hover(function(idx, element) { //$("#" + $(this).attr('name').replace(" ", "_")).css("display", "block"); $("#" + $(this).attr('name').replace(" ", "_")).attr('style', 'display: d-flex;') - //drawMinimap("#" + $(this).attr('name').replace(" ", "_")) manageMM("#" + $(this).attr('name').replace(" ", "_")) if (selectedVista=='frasi'){ loadFrasi(); } - - - + addFormaListeners(); }); @@ -716,39 +684,12 @@ $(" ."+formaClass).hover(function(idx, element) { sid = '.' + sentence.toString() //console.log(sid) $(sid).addClass('text-info font-italic') - /* - $(sid).each(function(){ - //console.log($(this).attr('class')) - if ($(this).attr('class').includes(' Ma ')){ - $(this).addClass("text-primary font-weight-normal") - } - if ($(this).attr('class').includes(' Su ')){ - $(this).addClass("text-info font-weight-normal") - } - if ($(this).attr('class').includes(' Co ')){ - $(this).addClass("text-warning font-weight-normal") - } - if ($(this).attr('class').includes(' Pc ')){ - $(this).addClass("text-success font-weight-normal") - } - if ($(this).attr('class').includes(' Pa ')){ - $(this).addClass("text-secondary font-weight-normal") - } - }) - */ } function resetSentenceStructure(sentence) { - /* - $(" ." + sentence).removeClass('text-info font-weight-normal') - $(" ." + sentence).removeClass('text-primary font-weight-normal') - $(" ." + sentence).removeClass('text-secondary font-weight-normal') - $(" ." + sentence).removeClass('text-warning font-weight-normal') - $(" ." + sentence).removeClass('text-success font-weight-normal') - */ $(" ." + sentence).removeClass('text-info font-italic') }