gestione liste

This commit is contained in:
cesare 2023-02-09 13:20:25 +01:00
parent 4c7af575d8
commit fa9aecd1e2
3 changed files with 525 additions and 453 deletions

View File

@ -62,7 +62,7 @@ $(document).ready(function() {
drawMinimap("InfernoCanto_1")
const end = performance.now();
console.log(`Load cantiche time: ${end - start} ms`);
$("#valoreVista").on('change', function() {
selectedVista = $(this).val();
switch (selectedVista){
@ -228,7 +228,11 @@ $(" ."+formaClass).hover(function(idx, element) {
}
});
jQuery(document).delegate(' .lista-risultati', 'click', function(e) {
var cantica=$(this).siblings(' .btn-link')[0];
var canticaid=$(cantica).attr('id')
console.log('fava lista risultati '+canticaid)
});
jQuery(document).delegate('.navig-canto', 'click', function(e) {
resetFrasi()
@ -740,9 +744,10 @@ $(" ."+formaClass).hover(function(idx, element) {
let count = resultsInCantica.reduce((n, x) => n + (x === cantica), 0);
if (count>0){
var spanbadgecantica = $('<span />');
spanbadgecantica.attr('class', 'badge badge-primary badge-pill ml-1');
spanbadgecantica.append(count)
spanbadgecantica.appendTo($('#cantica' + i))
spanbadgecantica.attr('class', 'badge badge-primary badge-pill ml-1 lista-risultati');
spanbadgecantica.append(count +' >')
//spanbadgecantica.appendTo($('#cantica' + i))
$('#cantica' + i).after(spanbadgecantica)
}
}
//aggiunge badge con totale risultati accanto ai canti

View File

@ -69,7 +69,7 @@ document.addEventListener("dblclick", function(e){
if (name === "sentenceStructArcs")
return new Inspector(document.querySelector("#displayinfo"));
});
main.redefine('width', 650);
main.redefine('width', 580);
main.redefine('height', 500);
//main.redefine("links", d3.csv("https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/files/parsint_mod_completo_pre_new_4.csv", d3.autoType));

File diff suppressed because it is too large Load Diff