modificato hover nella lista risultati

This commit is contained in:
cesare 2023-03-09 17:41:52 +01:00
parent 799eebea31
commit 538d56eb32
2 changed files with 44 additions and 4 deletions

View File

@ -335,7 +335,7 @@ $(" ."+formaClass).hover(function(idx, element) {
}
return
}
const start = performance.now();
queryExecuted = false;
listarisultati.sort(function(a, b){return a - b});
@ -416,6 +416,8 @@ $(" ."+formaClass).hover(function(idx, element) {
elencoRisutati.append(mhr)
}
const endCaricamento = performance.now();
console.log(`Caricamento contesti time: ${endCaricamento - start} ms`);
//evidenzio resultati
@ -424,6 +426,9 @@ $(" ."+formaClass).hover(function(idx, element) {
$(idris).addClass("font-weight-bold mark ")
}
const endEvidRis = performance.now();
console.log(`Evidenza risultati time: ${endEvidRis - start} ms`);
//evidenzio i periodi se unità di ricerca è impostato come periodo
if (listaPeriodiRisultato.length){
for (msid of listaPeriodiRisultato){
@ -444,14 +449,23 @@ $(" ."+formaClass).hover(function(idx, element) {
//visualizzo
$("#vistaFrasi").attr('style', 'display: d-flex;');
//manageMM("#vistaFrasi")
const endVis = performance.now();
console.log(`Visualizzazione time: ${endVis - start} ms`);
drawMinimap('#vistaFrasi')
const enddmm = performance.now();
console.log(`DrawMM time: ${enddmm - start} ms`);
if (selectedVista=='frasi'){
loadFrasi();
}
//aggiungo listeners
addFormaListeners()
//addFormaListeners()
addFormaListenersInCanto()
const endal = performance.now();
console.log(`Addlistener time: ${endal - start} ms`);
});
@ -557,6 +571,32 @@ $(" ."+formaClass).hover(function(idx, element) {
}
function addFormaListenersInCanto(){
$(cantoDisplayed).find(" ." + formaClass).each(function(idx, element) {
var ele = $(element);
ele.tooltip({
content: (function() { return formatTTContent(ele.attr('title'), ele.attr('class').split(' ')[1]); }),
classes: { "ui-tooltip": 'Nik_dropdown-content' },
close: function(event, ui) { $(".ui-helper-hidden-accessible").remove(); },
create: function(ev, ui) { $(this).data("ui-tooltip").liveRegion.remove(); },
hide: false,
show: {delay: 800,duration: 0}
});
ele.hover(function(idx, element) {
sentenceId = $(this).attr('class').split(' ')[0].split('_')
var tmplisid = sentenceId[0] + '_' + sentenceId[1] + '_' + sentenceId[3]
lsentid = $(this).attr('class').split(' ')[0]
lisid = tmplisid
});
});
}
function getRoman(numero) {

View File

@ -306,12 +306,12 @@ function getFormaContext(formaid, numversi=3) {
var pos = 0
var startindex=Math.max(0, (offset-25))
console.log('Forma id: '+formaid+' startindex '+ startindex+' offset '+offset+' ('+cantica+')')
//console.log('Forma id: '+formaid+' startindex '+ startindex+' offset '+offset+' ('+cantica+')')
for (i=startindex; i<listaforme.length; i++){
var tmpos=listaforme[i].split('_')[2]
if (tmpos==formaid){
pos=i;
console.log(' in pos: '+pos)
//console.log(' in pos: '+pos)
break;
}
}