Raggruppati tutti i colori nei css (escluso colorssp di util.js)

This commit is contained in:
Luca Trupiano 2023-02-20 13:55:06 +01:00
parent 3914502f8e
commit 8a478b7c39
7 changed files with 551 additions and 149 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

348
css/custom1_4.2.css Normal file
View File

@ -0,0 +1,348 @@
@charset "UTF-8";
/* custom.css */
@font-face {
font-family: Humanist-777;
src: url(../fonts/Humanist-777-Font.otf);
}
@font-face {
font-family: Bracciolini;
src: url(../fonts/LDR_Bracciolini.otf);
}
html,
body {
height: 100%;
font-family: 'Humanist-777', 'Roboto';
}
.menuNavigazione {
width: 15%;
}
#colVisualizza {
min-height: 700px;
}
.minimap {
width: 110px;
min-height: 700px;
}
.menuRicerca {
width: 30%;
}
.visCanto {
height: 500px;
}
.visInfo {
height: 200px;
}
#displaycanto {
display: d-flex;
height: 450px;
overflow-y: scroll;
}
.doubleborder {
z-index: 90;
border-bottom-width: 8px !important;
border-bottom-style: double !important;
}
.badge-outline-info {
padding: .1rem .15rem;
margin-left: .15rem;
margin-right: .2rem;
font-weight: 300;
vertical-align: super;
border: 1px solid;
}
.lista-risultati:hover {
font-weight: 900;
cursor: pointer;
}
.navig-canto .sel-canto {
line-height: 1.2em;
}
.navig-canto:hover {
font-weight: 800;
cursor: pointer;
}
.ui-icon.inline {
display:inline-block;
}
.ui-state-disabled-opacity-1 {
opacity: 1 !important;
}
.ui-state-disabled-opacity-06 {
opacity: 0.6 !important;
}
.ui-selectable {
list-style-type: none;
margin: 0;
padding: 0;
}
.selCantiXX {
border:6px solid #f8f9fa;
border-collapse:collapse;
padding:0px;
}
#queryText {
width: 150px;
border-width: 2px !important;
}
/*
Minimap
*/
.minimap__container {
/*position: fixed;*/
/*top: 160px;*/
/*left: 600px;*/
min-width: 20px;
z-index: 100;
}
.minimap__size {
position: relative;
z-index: 5;
}
.minimap__viewer {
width: 70px;
position:absolute;
top: 2px;
left: 1px;
transform-origin: 0 0;
z-index: 100;
border: 1px solid;
}
.minimap__content {
position:absolute;
top: 63;
left: 0;
width:100%;
height: 100%;
z-index: 10;
transform-origin: 0 0;
margin: 4px 0px 0px 4px;
border-style: none;
}
/*
Ex browsingldc.css
*/
.blog-main{
font-size: 18px;
font-family: "Bracciolini", "Spectral", -apple-system, BlinkMacSystemFont, Helvetica Neue,
Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, sans-serif;
}
.synt__info{
font-size: 12px;
font-weight: normal;
font-style: italic;
font-family: "Bracciolini", "Spectral", -apple-system, BlinkMacSystemFont, Helvetica Neue,
Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, sans-serif;
}
.numverso {
font-size: 12px;
font-family: 'Humanist-777', 'Roboto';
}
/* on mouseOver classes */
.Nik_dropdown {
position: relative;
display: inline-block;
}
.Nik_dropdown-content {
max-width: 170px;
min-width: 70px;
padding: 0px 0px;
font-size: 12px;
z-index: 100;
}
.Nik_dropdown:hover .Nik_dropdown-content {
display: block;
}
cite.elencoris {
line-height: 2.5;
}
.canto {
-webkit-user-select: none;
user-select: none;
}
.itemelenco {
-webkit-user-select: none;
user-select: none;
}
.ttContent {
padding: 5px 5px 0px 5px;
}
/* ------- customize colors -------- */
/* LINK utili:
https://lingtalfi.com/bootstrap4-color-generator
https://colordesigner.io/gradient-generator/?mode=lch#fafa6e-2A4858
https://colordesigner.io/#004056-2C858D-74CEB7-C9FFD5-FFFFCB
https://colordesigner.io/#fab37f-f1924e-4abd8c-00968e-106e7c
https://bootstrap.build/app
*/
/*
- lida1:
$primary rgb(95, 142, 194) #5f8ec2
$secondary $gray-600 #6c757d
$success rgb(117, 159, 154) #759F9A
$info #935fc2
$warning rgb(229, 194, 105) #E5C269 #eace87
$danger #9f757a
$text-muted $gray-700 #495057
------------------------------------*/
/* ------- #cbcbc0, #e7d4bf , #d9c8ca -------- */
.navbar {
background-image: linear-gradient(to right, #e7d4bf , #d9c8ca);
border-bottom-width: 2px !important;
border-bottom-color: #cbcbc0 !important;
}
.doubleborder {
border-bottom-color: #cbcbc0 !important;
}
/* ------- $primary #5f8ec2 -------- */
.badge-outline-info {
color: #5f8ec2;
border-color: #5f8ec2;
}
.navig-canto:hover {
color: #5f8ec2 !important;
}
.minimap__viewer {
border-color: #5f8ec2;
}
/* ------- $success rgb(117, 159, 154) / #759F9A , #DEE2E6 -------- */
.custom-control-input:active~.custom-control-label::before {
background-color: rgba(117, 159, 154, 0.5) !important;
border-color: rgba(117, 159, 154, 0.5) !important;
}
.custom-control-input:focus:not(:checked)~.custom-control-label::before {
border-color: rgb(117, 159, 154) !important;
}
.custom-control-input:checked~.custom-control-label::before {
border-color: rgb(117, 159, 154) !important;
background-color: rgb(117, 159, 154) !important;
}
.ui-selectable .ui-selecting {
background: #759F9A;
}
.ui-selectable .ui-selected {
background: #DEE2E6;
color: #759F9A !important;
}
/* ------- $warning #eace87 -------- */
.mark {
background-color: #eace87 !important;
}
/* ------- #985949 -------- */
#displaycanto span:hover {
color: #985949;
}
.ttContent {
color: #985949;
}
/* ------- #5b352c -------- */
cite.elencoris {
color: #5b352c;
}
/* ------- #1E90FF -------- */
.Nik_dropdown-content {
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
color: #1E90FF;
}
/* ricerca avanzata */
.bg-lida10 {
background-color: #c8d9d7 !important;
}
/* clausola */
.bg-lida11 {
background-color: #e3eceb !important;
}
/* AND */
.bg-lida12 {
background-color: #faf3e1 !important;
}
/* OR */
.bg-lida13 {
background-color: #ece3e4 !important;
}
/* visualizza e minimap */
.bg-lida-vis {
background-color: #fefeff! important;
}
/* body */
.body-vis {
background-color: #fcfaf7! important;
padding-top: 0px;
}

View File

@ -1,7 +1,6 @@
@charset "UTF-8"; @charset "UTF-8";
/* custom.css */ /* custom.css */
/* success rgb(117, 159, 154) #759F9A */
@font-face { @font-face {
font-family: Humanist-777; font-family: Humanist-777;
@ -23,26 +22,25 @@ body {
width: 15%; width: 15%;
} }
#colVisualizza {
min-height: 700px;
}
.minimap { .minimap {
width: 110px; width: 110px;
height: 700px; min-height: 700px;
} }
.menuRicerca { .menuRicerca {
width: 30%; width: 30%;
} }
.visCanto { .visCanto {
height: 500px; height: 500px;
} }
.visInfo { .visInfo {
height: 200px; height: 200px;
}
.navbar {
border-bottom-width: 2px !important;
border-bottom-color: #cbcbc0 !important;
} }
#displaycanto { #displaycanto {
@ -52,50 +50,37 @@ body {
} }
.doubleborder { .doubleborder {
z-index: 90; z-index: 90;
border-bottom-width: 8px !important; border-bottom-width: 8px !important;
border-bottom-style: double !important; border-bottom-style: double !important;
border-bottom-color: #cbcbc0 !important;
} }
.custom-control-input:active~.custom-control-label::before {
background-color: rgba(117, 159, 154, 0.5) !important;
border-color: rgba(117, 159, 154, 0.5) !important;
}
.custom-control-input:focus:not(:checked)~.custom-control-label::before {
border-color: rgb(117, 159, 154) !important;
}
.custom-control-input:checked~.custom-control-label::before {
border-color: rgb(117, 159, 154) !important;
background-color: rgb(117, 159, 154) !important;
}
.badge-outline-info { .badge-outline-info {
padding: .1rem .15rem; padding: .1rem .15rem;
margin-left: .15rem; margin-left: .15rem;
margin-right: .2rem; margin-right: .2rem;
font-weight: 300; font-weight: 300;
vertical-align: super; vertical-align: super;
color: #5f8ec2; border: 1px solid;
border: 1px solid #5f8ec2;
} }
.lista-risultati:hover { .lista-risultati:hover {
font-weight: 900; font-weight: 900;
cursor: pointer; cursor: pointer;
} }
.navig-canto .sel-canto { .navig-canto .sel-canto {
line-height: 1.2em; line-height: 1.2em;
} }
.navig-canto:hover { .navig-canto:hover {
font-weight: 800; font-weight: 800;
color: #5f8ec2 !important; cursor: pointer;
cursor: pointer;
} }
.ui-icon.inline { display:inline-block; } .ui-icon.inline {
display:inline-block;
}
.ui-state-disabled-opacity-1 { .ui-state-disabled-opacity-1 {
opacity: 1 !important; opacity: 1 !important;
@ -105,9 +90,11 @@ body {
opacity: 0.6 !important; opacity: 0.6 !important;
} }
.ui-selectable .ui-selecting { background: #759F9A; } .ui-selectable {
.ui-selectable .ui-selected { background: #DEE2E6; color: #759F9A !important; } list-style-type: none;
.ui-selectable { list-style-type: none; margin: 0; padding: 0; } margin: 0;
padding: 0;
}
.selCantiXX { .selCantiXX {
border:6px solid #f8f9fa; border:6px solid #f8f9fa;
@ -145,20 +132,19 @@ Minimap
left: 1px; left: 1px;
transform-origin: 0 0; transform-origin: 0 0;
z-index: 100; z-index: 100;
/*border: 1px solid #0000009a; border: 1px solid;
border: 1px solid blue;
border: 1px solid #007bff; */
border: 1px solid #5f8ec2;
} }
.minimap__content { .minimap__content {
position:absolute; position:absolute;
top: 0; top: 63;
left: 0; left: 0;
width:100%; width:100%;
height: 100%; height: 100%;
z-index: 10; z-index: 10;
transform-origin: 0 0; transform-origin: 0 0;
margin: 4px 0px 0px 4px;
border-style: none;
} }
@ -178,130 +164,185 @@ Ex browsingldc.css
font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif; font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif;
} }
#displaycanto span:hover {
color: #7d325a;
}
.numverso { .numverso {
font-size: 12px; font-size: 12px;
color: gray; font-family: 'Humanist-777', 'Roboto';
font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue,
Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell,
Fira Sans, Droid Sans,
sans-serif;
} }
/* on mouseOver classes */ /* on mouseOver classes */
.Nik_dropdown { .Nik_dropdown {
position: relative; position: relative;
display: inline-block; display: inline-block;
} }
.Nik_dropdown-content { .Nik_dropdown-content {
/*display: none;*/ max-width: 170px;
/*position: absolute; min-width: 70px;
top: -60px; padding: 0px 0px;
left: 50px; font-size: 12px;
background-color: rgb(252, 252, 252);*/ z-index: 100;
/* background-color: #92a8d1; */
max-width: 170px;
min-width: 70px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
padding: 0px 0px;
color:#1E90FF;
font-size: 12px;
z-index: 100;
/*float: top;*/
} }
.Nik_dropdown:hover .Nik_dropdown-content { .Nik_dropdown:hover .Nik_dropdown-content {
display: block; display: block;
}
.mark {
background-color: #a996a0 !important;
} }
cite.elencoris { cite.elencoris {
color: #c6b59f;
line-height: 2.5; line-height: 2.5;
} }
.canto { .canto {
-webkit-user-select: none; -webkit-user-select: none;
user-select: none; user-select: none;
} }
.itemelenco { .itemelenco {
-webkit-user-select: none; -webkit-user-select: none;
user-select: none; user-select: none;
} }
.ttContent { .ttContent {
color: #55327d;
padding: 5px 5px 0px 5px; padding: 5px 5px 0px 5px;
} }
/* ------- customize colors -------- */ /* ------- customize colors -------- */
/* https://lingtalfi.com/bootstrap4-color-generator /* LINK utili:
https://colordesigner.io/gradient-generator/?mode=lch#fafa6e-2A4858 https://lingtalfi.com/bootstrap4-color-generator
https://colordesigner.io/#004056-2C858D-74CEB7-C9FFD5-FFFFCB https://colordesigner.io/gradient-generator/?mode=lch#fafa6e-2A4858
https://colordesigner.io/#fab37f-f1924e-4abd8c-00968e-106e7c https://colordesigner.io/#004056-2C858D-74CEB7-C9FFD5-FFFFCB
lida3 #4abd8c https://colordesigner.io/#fab37f-f1924e-4abd8c-00968e-106e7c
lida4 #00968e https://bootstrap.build/app
lida5 #106e7c */
lida8 #fab37f /*
lida9 #f1924e - lida1:
lida10 #dbf2e8 2: $primary rgb(95, 142, 194) #5f8ec2
lida10g #b6daca 2: $secondary $gray-600 #6c757d
lida11 #fef0e5 2: $success rgb(117, 159, 154) #759F9A
lida12 #edf9f3 2: $info #935fc2
lida-vis #f8f9fa 2: $warning rgb(229, 194, 105) #E5C269 #eace87
$danger #9f757a
#9f757a $text-muted $gray-700 #495057
https://bootstrap.build/app - lida2:
lida2: $primary #734450
$primary rgb(95, 142, 194) #5f8ec2 2: #734450 $secondary $gray-600 #b8a387 -
$secondary $gray-600 2: #b8a387 - $success rgb(5, 74, 41) #054a29
$success rgb(117, 159, 154) #759F9A 2: #054a29 $info #55327d
$info #935fc2 2: #55327d $warning #325a7d
$warning rgb(229, 194, 105) #E5C269 2: #325a7d $danger #7d325a
$danger #9f757a 2: #7d325a #b8a387
$text-muted $gray-700 $text-muted $gray-700
------------------------------------*/ ------------------------------------*/
/* ------- #cbcbc0 -------- */
.navbar {
/* background-image: linear-gradient(to right, #e7d4bf , #d9c8ca); */
border-bottom-width: 2px !important;
border-bottom-color: #cbcbc0 !important;
}
.doubleborder {
border-bottom-color: #cbcbc0 !important;
}
/* ------- $primary #734450 -------- */
.badge-outline-info {
color: #734450;
border-color: #734450;
}
.navig-canto:hover {
color: #734450 !important;
}
.minimap__viewer {
border-color: #734450;
}
/* ------- $success rgb(5, 74, 41) / #054a29 , #DEE2E6 -------- */
.custom-control-input:active~.custom-control-label::before {
background-color: rgba(5, 74, 41, 0.5) !important;
border-color: rgba(5, 74, 41, 0.5) !important;
}
.custom-control-input:focus:not(:checked)~.custom-control-label::before {
border-color: rgb(5, 74, 41) !important;
}
.custom-control-input:checked~.custom-control-label::before {
border-color: rgb(5, 74, 41) !important;
background-color: rgb(5, 74, 41) !important;
}
.ui-selectable .ui-selecting {
background: #054a29;
}
.ui-selectable .ui-selected {
background: #DEE2E6;
color: #054a29 !important;
}
/* ------- #eace87 -------- */
.mark {
background-color: #a996a0 !important;
}
/* ------- $danger #7d325a -------- */
#displaycanto span:hover {
color: #7d325a;
}
.ttContent {
color: #7d325a;
}
/* ------- #c6b59f -------- */
cite.elencoris {
color: #c6b59f;
}
/* ------- #1E90FF -------- */
.Nik_dropdown-content {
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
color: #1E90FF;
}
/* ricerca avanzata */ /* ricerca avanzata */
.bg-lida10 { .bg-lida10 {
background-color: #3c7d5e !important; background-color: #c8d9d7 !important;
} }
/* clausola */ /* clausola */
.bg-lida12 { .bg-lida11 {
background-color: #5b826f !important; background-color: #e3eceb !important;
} }
/* AND */ /* AND */
.bg-lida10g { .bg-lida12 {
background-color: #2f7778 !important; background-color: #faf3e1 !important;
} }
/* OR */ /* OR */
.bg-lida11 { .bg-lida13 {
background-color: #5b8182 !important; background-color: #ece3e4 !important;
} }
/* visualizza e minimap */ /* visualizza e minimap */
.bg-lida-vis { .bg-lida-vis {
background-color: #f8f9fa! important; background-color: #f8f9fa! important;
@ -313,5 +354,3 @@ lida2:
padding-top: 0px; padding-top: 0px;
} }

View File

@ -11,9 +11,9 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Spectral"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Spectral">
<!-- <!--
--> -->
<link rel="stylesheet" id="style1-Boot" href="./css/bootstrap.min.lida2.css"> <link rel="stylesheet" id="style1-Boot" href="./css/bootstrap.min.lida1.css">
<link rel="stylesheet" id="style1-Custom" href="./css/custom_4.2.css"> <link rel="stylesheet" id="style1-Custom" href="./css/custom1_4.2.css">
<link rel="stylesheet" id="style2-Boot" href="./css/bootstrap.min.lida1.css" disabled> <link rel="stylesheet" id="style2-Boot" href="./css/bootstrap.min.lida2.css" disabled>
<link rel="stylesheet" id="style2-Custom" href="./css/custom2_4.2.css" disabled> <link rel="stylesheet" id="style2-Custom" href="./css/custom2_4.2.css" disabled>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
@ -411,7 +411,7 @@
<div class="d-table h-75 w-100"> <div class="d-table h-75 w-100">
<div class="d-table-row"> <div class="d-table-row">
<div class="blog-main visCanto h-100"> <div class="blog-main visCanto h-100">
<div id='displaycanto' class="py-3 pl-3 w-100"></div> <div id='displaycanto' class="py-3 pl-3 " style="width: min-content;"></div>
<div class="ui-resizable-handle ui-resizable-s border-bottom doubleborder"></div> <div class="ui-resizable-handle ui-resizable-s border-bottom doubleborder"></div>
</div> </div>
</div> </div>
@ -425,8 +425,7 @@
</div> </div>
<div id="colMinimap" class="d-table-cell bg-lida-vis minimap border-right border-bottom align-top"> <div id="colMinimap" class="d-table-cell bg-lida-vis minimap border-right border-bottom align-top">
<div style="height: 63px; overflow:hidden;">&nbsp;</div> <div id="displayminimap" style="padding-top: 63px;" class="col px-0 pb-0 m-0 w-100 h-100"></div>
<div id="displayminimap" class="col p-0 m-0 w-100 h-100"></div>
</div> </div>
<div id="colRicerca" class="d-table-cell menuRicerca align-top"> <div id="colRicerca" class="d-table-cell menuRicerca align-top">
@ -1100,7 +1099,7 @@
<!-- TIPO GRAMMATICALE --> <!-- TIPO GRAMMATICALE -->
<div style="display: none;" <div style="display: none;"
class="col-12 tab-pane px-0 bg-lida12 border-top" class="col-12 tab-pane px-0 bg-lida11 border-top"
id="tipogrammaticaleN" role="tabpanel" aria-labelledby="claN-tab" id="tipogrammaticaleN" role="tabpanel" aria-labelledby="claN-tab"
data-claType="Grammaticale" data-claActive="1"> data-claType="Grammaticale" data-claActive="1">
<div <div
@ -1185,7 +1184,7 @@
<!-- TIPO SINTATTICO --> <!-- TIPO SINTATTICO -->
<div style="display: none;" <div style="display: none;"
class="col-12 tab-pane px-0 bg-lida12 border-top" class="col-12 tab-pane px-0 bg-lida11 border-top"
id="tiposintatticoN" role="tabpanel" aria-labelledby="claN-tab" id="tiposintatticoN" role="tabpanel" aria-labelledby="claN-tab"
data-claType="Sintattico" data-claActive="1"> data-claType="Sintattico" data-claActive="1">
<div <div
@ -1852,7 +1851,7 @@
<!-- TIPO METAFORA --> <!-- TIPO METAFORA -->
<div style="display: none;" <div style="display: none;"
class="col-12 tab-pane px-0 bg-lida12 border-top" id="tipometaforaN" class="col-12 tab-pane px-0 bg-lida11 border-top" id="tipometaforaN"
role="tabpanel" aria-labelledby="claN-tab" data-claType="Metafora" role="tabpanel" aria-labelledby="claN-tab" data-claType="Metafora"
data-claActive="1"></div> data-claActive="1"></div>
<!-- FINE TIPO METAFORA --> <!-- FINE TIPO METAFORA -->
@ -1908,7 +1907,7 @@
</div> </div>
<div id="collapseClaxX1Xx" class="collapse" <div id="collapseClaxX1Xx" class="collapse"
aria-labelledby="headingCxX1Xx" data-parent="#sortable0"> aria-labelledby="headingCxX1Xx" data-parent="#sortable0">
<div class="card-body p-0 mx-1 mb-1 bg-lida12 border rounded border-success" <div class="card-body p-0 mx-1 mb-1 bg-lida11 border rounded border-success"
id="claBodyxX1Xx"></div> id="claBodyxX1Xx"></div>
</div> </div>
</li> </li>

View File

@ -31,7 +31,7 @@ function drawMinimap(name){
stop: function(event, ui) { minimapScrolling = false; }, stop: function(event, ui) { minimapScrolling = false; },
drag: function(event, ui) { drag: function(event, ui) {
minimapScrolling = true; minimapScrolling = true;
$(displayCantoId).scrollTop((ui.offset.top - minimapTopPos) * (1 / (realScale*1.014))); $(displayCantoId).scrollTop((ui.offset.top - minimapTopPos) / realScale);
} }
}); });
} }
@ -62,7 +62,7 @@ function showMinimap() {
cssLinkscroll.type = "text/css"; cssLinkscroll.type = "text/css";
iFrameDoc.open(); iFrameDoc.open();
iFrameDoc.write('<div class="w-100 py-3 pl-3" style="display: d-flex; overflow-y: scroll;">'); // da pulire... iFrameDoc.write('<div class="blog-main w-100 " style="display: d-flex;">'); // da pulire...
iFrameDoc.write(html); iFrameDoc.write(html);
iFrameDoc.write('</div>'); iFrameDoc.write('</div>');
iFrameDoc.close(); iFrameDoc.close();
@ -81,9 +81,11 @@ function showMinimap() {
function getDimensionsDiv() { function getDimensionsDiv() {
var srcCantoHeight = $(currentMinimap)[0].clientHeight; var srcCantoHeight = $(currentMinimap)[0].clientHeight;
var maxHeight = ($(displayminimapId)[0].clientHeight)-4; //h attuale dello spazio minimap -4 padding //var maxHeight = ($(displayminimapId)[0].clientHeight)-4-63; //h attuale dello spazio minimap -4 padding -63 top padding
var maxWidth = $(displayminimapId)[0].clientWidth; //w attuale della minimap (css) -2 bordi var maxHeight = ($(displayminimapId)[0].clientHeight)-66; //h attuale dello spazio minimap; -63 top padding, -2 bordi minimapviewer, -1 bordo col, -4 bordi iframe
var miniCantoHeight = Math.ceil(((srcCantoHeight-44)/25*26)+44+32); //h prevista del canto nella minimap var maxWidth = $(displayminimapId)[0].clientWidth; //w attuale della minimap (css)
//var miniCantoHeight = Math.ceil(((srcCantoHeight-44)/25*26)+44+32); //h prevista del canto nella minimap
var miniCantoHeight = srcCantoHeight+32; //h prevista del canto nella minimap 16x2: padding py
var resizableWidth = $(visCantoClass)[0].clientWidth; var resizableWidth = $(visCantoClass)[0].clientWidth;
var resizableHeight = $(visCantoClass)[0].clientHeight; var resizableHeight = $(visCantoClass)[0].clientHeight;
@ -91,14 +93,23 @@ function showMinimap() {
var heightRatio = resizableHeight/srcCantoHeight; var heightRatio = resizableHeight/srcCantoHeight;
let viewerHeight = (maxHeight*heightRatio)-2; // -2 = bordi let viewerHeight = (maxHeight*heightRatio)-2; // -2 = bordi
let viewerWidth = Math.min(viewerHeight/resizableRatio, maxWidth-2); let viewerWidth = Math.min(viewerHeight/resizableRatio, maxWidth-2); // -2 bordi
realScale = Math.min((maxHeight/miniCantoHeight), 1); realScale = Math.min((maxHeight/miniCantoHeight), 1);
minimap.style.width = '100%'; minimap.style.width = '100%';
console.log("maxHeight: "+maxHeight)
console.log("maxWidth: "+maxWidth)
console.log("srcCantoHeight: "+$(currentMinimap)[0].clientHeight)
console.log("realScale: "+realScale)
minimapContent.style.transform = `scale(${realScale})`; minimapContent.style.transform = `scale(${realScale})`;
minimapContent.style.height = Math.trunc(miniCantoHeight+25) + "px"; //minimapContent.style.height = Math.trunc(miniCantoHeight) + "px";
minimapContent.style.width = Math.trunc(maxWidth/realScale) + "px"; //minimapContent.style.width = Math.trunc(maxWidth/realScale) + "px";
minimapContent.style.height = miniCantoHeight + "px";
minimapContent.style.width = maxWidth/realScale + "px";
console.log("minimapContent.style.height: "+minimapContent.style.height)
console.log("minimapContent.style.width: "+minimapContent.style.width)
viewer.style.height = viewerHeight + "px"; viewer.style.height = viewerHeight + "px";
viewer.style.width = viewerWidth + "px"; viewer.style.width = viewerWidth + "px";
@ -115,8 +126,10 @@ function showMinimap() {
function trackScrollCanto() { function trackScrollCanto() {
var minimapHeight = $(displayminimapId)[0].clientHeight; var minimapHeight = $(displayminimapId)[0].clientHeight;
var posDbefore = $(displayCantoId).scrollTop(); var posDbefore = $(displayCantoId).scrollTop();
//console.log(posDbefore);
var srcCantoHeight = $(currentMinimap)[0].clientHeight; var srcCantoHeight = $(currentMinimap)[0].clientHeight;
var posAfter = (minimapHeight*posDbefore)/(srcCantoHeight*1.014); //var posAfter = (minimapHeight*posDbefore)/(srcCantoHeight*1.014);
var posAfter = (minimapHeight*posDbefore)/(srcCantoHeight*1.088);
$(minimapviewerId).offset({ top: initOffset + posAfter}); $(minimapviewerId).offset({ top: initOffset + posAfter});
} }

View File

@ -33,6 +33,7 @@ $(document).ready(function() {
break; break;
default: default:
}; };
drawMinimap(currentMinimap);
} }
}); });
@ -143,7 +144,7 @@ $(document).ready(function() {
minWidth: 350, minWidth: 350,
resize: function(event, ui) { resize: function(event, ui) {
ui.position.left = 0; ui.position.left = 0;
$("#displaycanto").width("100%"); //$("#displaycantowrapper").width("100%");
getDimensionsDiv(); getDimensionsDiv();
}, },
stop: function(event, ui) { stop: function(event, ui) {
@ -157,12 +158,14 @@ $(document).ready(function() {
maxHeight: 800, maxHeight: 800,
alsoResize: "#displaycanto", alsoResize: "#displaycanto",
resize: function(event, ui) { resize: function(event, ui) {
$("#displaycanto").width(" min-content");
getDimensionsDiv(); getDimensionsDiv();
}, },
//stop: function(event, ui) { stop: function(event, ui) {
$("#displaycanto").width(" min-content");
//$(".canto").fitText(); //$(".canto").fitText();
// ui.element.width(""); // ui.element.width("");
//} }
}); });
// Evento: modifica dell'unitaRicerca' // Evento: modifica dell'unitaRicerca'
@ -249,15 +252,15 @@ $(document).ready(function() {
var condtype = $(this).val(); var condtype = $(this).val();
var condId = $(this).attr('id').substring(12); var condId = $(this).attr('id').substring(12);
if (condtype == "AND") { if (condtype == "AND") {
$("#cond" + condId).removeClass( "condLI-OR bg-lida11" ) $("#cond" + condId).removeClass( "condLI-OR bg-lida13" )
$("#cond" + condId).addClass( "condLI-AND bg-lida10g" ) $("#cond" + condId).addClass( "condLI-AND bg-lida12" )
$(this).removeClass( "bg-lida11" ) $(this).removeClass( "bg-lida13" )
$(this).addClass( "bg-lida10g" ) $(this).addClass( "bg-lida12" )
} else { } else {
$("#cond" + condId).removeClass( "condLI-AND bg-lida10g" ) $("#cond" + condId).removeClass( "condLI-AND bg-lida12" )
$("#cond" + condId).addClass( "condLI-OR bg-lida11" ) $("#cond" + condId).addClass( "condLI-OR bg-lida13" )
$(this).removeClass( "bg-lida10g" ) $(this).removeClass( "bg-lida12" )
$(this).addClass( "bg-lida11" ) $(this).addClass( "bg-lida13" )
}; };
refreshClaList(); refreshClaList();
}); });
@ -719,7 +722,7 @@ $(document).ready(function() {
// Funzione di creazione della parte di definizione del contesto delle clausole // Funzione di creazione della parte di definizione del contesto delle clausole
function addClaContext(tabID){ function addClaContext(tabID){
var contClone = document.getElementById("contextTable-xX0").cloneNode(true); var contClone = document.getElementById("contextTable-xX0").cloneNode(true);
contClone.setAttribute("class","row no-gutters px-2 pt-0 pb-2 bg-lida12 border-top border-success"); contClone.setAttribute("class","row no-gutters px-2 pt-0 pb-2 bg-lida11 border-top border-success");
contClone = contClone.outerHTML.replace(/xX0/g, "xX" + tabID) contClone = contClone.outerHTML.replace(/xX0/g, "xX" + tabID)
$("#contextDiv" + tabID).append($(contClone)[0]); $("#contextDiv" + tabID).append($(contClone)[0]);
resetContext(tabID); resetContext(tabID);
@ -741,9 +744,9 @@ $(document).ready(function() {
cloneLI = cloneLI.outerHTML.replace(/xX4Xx/g, condListLen) cloneLI = cloneLI.outerHTML.replace(/xX4Xx/g, condListLen)
cloneLI = cloneLI.replace(/xX5Xx/g, condtype) cloneLI = cloneLI.replace(/xX5Xx/g, condtype)
if (condtype == "AND") { if (condtype == "AND") {
cloneLI = cloneLI.replace(/xX6Xx/g, "lida10g") cloneLI = cloneLI.replace(/xX6Xx/g, "lida12")
} else { } else {
cloneLI = cloneLI.replace(/xX6Xx/g, "lida11") cloneLI = cloneLI.replace(/xX6Xx/g, "lida13")
} }
if ($("#li-cla0")[0]) { if ($("#li-cla0")[0]) {
$("#li-cla0")[0].remove(); $("#li-cla0")[0].remove();