colori per dialoghi

This commit is contained in:
cesare 2024-01-05 13:20:10 +01:00
parent bc6faba0db
commit 39afb87499
2 changed files with 31 additions and 6 deletions

View File

@ -702,14 +702,21 @@ function loadDialoghi() {
continue;
if(diaclass.split('_')[1]!=cantoDisplayed.split('_')[1])
continue;
var csscl='diaDiretto '
var diaty=dialoghi[india]['Dty']
if (diaty=='SpeakableDiscourse')
csscl='diaSpeakable '
if (diaty=='ThoughtDiscourse')
csscl='diaPensato '
$(cantoDisplayed).find(' .'+diaclass).each(function() {
//#1f78b4
$(this).css('color', '#1f78b4');
$(this).addClass("font-weight-bold ")
$(this).addClass(csscl)
//$(this).css('color', '#1f78b4');
//$(this).addClass("font-weight-bold ")
})
minim.contents().find(' .'+diaclass).each(function() {
$(this).css('color', '#1f78b4');
$(this).addClass("font-weight-bold ")
$(this).addClass(csscl)
//$(this).css('color', '#1f78b4');
//$(this).addClass("font-weight-bold ")
})
}
@ -736,6 +743,15 @@ function loadFrasi() {
}
function resetFrasi(){
$(cantoDisplayed).find(' .diaDiretto').each(function() {
$(this).removeClass('diaDiretto');
})
$(cantoDisplayed).find(' .diaPensato').each(function() {
$(this).removeClass('diaPensato');
})
$(cantoDisplayed).find(' .diaSpeakable').each(function() {
$(this).removeClass('diaSpeakable');
})
$(cantoDisplayed).find(' .sentencetag').each(function() {
$(this).css('display', 'none');
})
@ -745,6 +761,15 @@ function resetFrasi(){
$(this).removeClass('font-weight-bold')
})
//let minim=$(" .minimap__content")
minim.contents().find(" .diaDiretto").each(function(){
$(this).removeClass('diaDiretto');
})
minim.contents().find(" .diaPensato").each(function(){
$(this).removeClass('diaPensato');
})
minim.contents().find(" .diaSpeakable").each(function(){
$(this).removeClass('diaSpeakable');
})
minim.contents().find(" .sentencetag").each(function(){
$(this).css('display', 'none');
})

View File

@ -33,7 +33,7 @@ document.addEventListener("dblclick", function(e){
for (let i = 0; i < sentence.length; i++) {
var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0]));
sentence[i].classList.remove('font-italic');
if (selectedVista!='frasi' && !listaPeriodiRisultato.includes(tmpsent) && !matches.length)
if (selectedVista!='frasi' && !listaPeriodiRisultato.includes(tmpsent))
sentence[i].style.removeProperty('color');
sentence[i].classList.remove('font-weight-normal');