spostata scrollbar a dx

This commit is contained in:
Luca Trupiano 2023-02-24 19:53:06 +01:00
parent 82ae18f5ad
commit 365ca53218
2 changed files with 9 additions and 5 deletions

View File

@ -411,7 +411,9 @@
<div class="d-table w-100">
<div class="d-table-row scrollMon">
<div class="blog-main visCanto h-100">
<div id='displaycanto' class="py-3 pl-3" style="width: min-content;"></div>
<div id="displaycantoWrapper">
<div id='displaycanto' class="py-3 pl-3" style="width: min-content;"></div>
</div>
<div class="ui-resizable-handle ui-resizable-s border-bottom doubleborder"></div>
</div>
</div>
@ -1053,7 +1055,7 @@
<div id="cla-Advanced" style="display: d-flex">
<div class=" p-1 border bg-light well" id="cla-list">
<div class=" p-1 border bg-light well" id="cla-list" style="border-color: #a5aaaa!important;">
<div id="cla-list-row"
class="row mx-0 justify-content-between">
<div class="col-12 p-0">

View File

@ -3,6 +3,7 @@
*/
const displayCantoId = '#displaycanto';
const displayCantoWrapperId = '#displaycantoWrapper';
const minimapviewerId = '#minimapviewer';
const displayminimapId = '#displayminimap';
const visCantoClass = '.visCanto';
@ -40,7 +41,7 @@ function drawMinimap(name){
stop: function(event, ui) { minimapScrolling = false; },
drag: function(event, ui) {
minimapScrolling = true;
$(displayCantoId).scrollTop((ui.offset.top - minimapTopPos) / realScale);
$(displayCantoWrapperId).scrollTop((ui.offset.top - minimapTopPos) / realScale);
}
});
}
@ -88,7 +89,7 @@ function showMinimap() {
getDimensionsDiv();
window.addEventListener('resize', getDimensionsDiv);
//window.addEventListener('resize', getDimensionsDiv);
}
@ -127,7 +128,8 @@ function showMinimap() {
function trackScrollCanto() {
//var minimapHeight = $(displayminimapId)[0].clientHeight;
var minimapHeight = ($(currentMinimap)[0].clientHeight+32)*realScale;
var posDbefore = $(displayCantoId).scrollTop();
//var posDbefore = $(displayCantoId).scrollTop();
var posDbefore = $(displayCantoWrapperId).scrollTop();
//console.log(posDbefore);
var srcCantoHeight = $(currentMinimap)[0].clientHeight;
var posAfter = (minimapHeight*posDbefore)/(srcCantoHeight*1.005);