diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 7cbeb51..0a0b442 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -33,6 +33,7 @@ $(document).ready(function() { const closeSTag="}" var cantoDisplayed = "#InfernoCanto_1"; + var prevCantoDisplayed = "#InfernoCanto_1"; var queryExecuted = false; var contextLength = 3; var idCitazione = "citazione_Frase"; @@ -172,7 +173,7 @@ $(" ."+formaClass).hover(function(idx, element) { - //displayCantoWrapperId + //$("#" + displayId).scroll(function() { $(displayCantoWrapperId).scroll(function() { if (minimapScrolling) { @@ -335,13 +336,16 @@ $(" ."+formaClass).hover(function(idx, element) { var canto, numeroCantica; var divVerso; - + prevCantoDisplayed=cantoDisplayed; $(cantoDisplayed).css("display", "none"); - + cantoDisplayed = "#vistaFrasi"; if (!queryExecuted){ $("#vistaFrasi").attr('style', 'display: d-flex;'); manageMM("#vistaFrasi") - $(cantoDisplayed).css("display", "none"); + if (selectedVista=='frasi'){ + loadFrasi(); + } + //$(cantoDisplayed).css("display", "none"); return } @@ -419,13 +423,18 @@ $(" ."+formaClass).hover(function(idx, element) { $(idris).addClass("font-weight-bold mark ") } - //aggiungo listeners - addFormaListeners() + //visualizzo $("#vistaFrasi").attr('style', 'display: d-flex;'); manageMM("#vistaFrasi") - cantoDisplayed = "#vistaFrasi"; + + + if (selectedVista=='frasi'){ + loadFrasi(); + } + //aggiungo listeners + addFormaListeners() }); @@ -638,6 +647,8 @@ $(" ."+formaClass).hover(function(idx, element) { listarisultati = [] listaPeriodiRisultato=[] resultSentences=new Set() + if(cantoDisplayed=='#vistaFrasi') + cantoDisplayed=prevCantoDisplayed $(cantoDisplayed).attr('style', 'display: d-flex;'); manageMM (cantoDisplayed) //drawMinimap(cantoDisplayed)