nella lista risultati hover solo sulle forme risultato

This commit is contained in:
cesare 2023-03-10 09:49:33 +01:00
parent 538d56eb32
commit 1054780b42
1 changed files with 53 additions and 12 deletions

View File

@ -245,7 +245,9 @@ $(" ."+formaClass).hover(function(idx, element) {
}
//aggiungo listeners
addFormaListeners()
//addFormaListeners()
//addFormaListenersInCanto()
addFormaListenersInRisultato()
//disegno minimap
drawMinimap('#vistaFrasi')
@ -455,18 +457,21 @@ $(" ."+formaClass).hover(function(idx, element) {
drawMinimap('#vistaFrasi')
const enddmm = performance.now();
console.log(`DrawMM time: ${enddmm - start} ms`);
if (selectedVista=='frasi'){
loadFrasi();
}
//aggiungo listeners
//addFormaListeners()
addFormaListenersInCanto()
//addFormaListenersInCanto()
addFormaListenersInRisultato()
const endal = performance.now();
console.log(`Addlistener time: ${endal - start} ms`);
const enddmm = performance.now();
console.log(`DrawMM time: ${enddmm - start} ms`);
});
@ -520,7 +525,8 @@ $(" ."+formaClass).hover(function(idx, element) {
loadFrasi();
}
addFormaListeners();
//addFormaListeners();
addFormaListenersInCanto();
});
@ -571,20 +577,25 @@ $(" ."+formaClass).hover(function(idx, element) {
}
function addFormaListenersInCanto(){
function addFormaListenersInRisultato(){
$(cantoDisplayed).find(" ." + formaClass).each(function(idx, element) {
var ele = $(element);
ele.tooltip({
for (ris of listarisultati) {
idris = '#e' + ris
ele=$(idris)
$(idris).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(); },
//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) {
}
$(cantoDisplayed).find(" ." + formaClass).each(function(idx, element) {
$(element).hover(function(idx, element) {
sentenceId = $(this).attr('class').split(' ')[0].split('_')
var tmplisid = sentenceId[0] + '_' + sentenceId[1] + '_' + sentenceId[3]
@ -595,6 +606,36 @@ $(" ."+formaClass).hover(function(idx, element) {
});
}
function addFormaListenersInCanto(){
let idn=0
$(cantoDisplayed).find(" ." + formaClass).each(function(idx, element) {
idn=idn+1
var ele = $(element);
$(element).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}
});
$(element).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
});
});
console.log('nr forme '+idn)
}