From 037c8145c18ec52b689cce369200178171a64562 Mon Sep 17 00:00:00 2001 From: Luca Trupiano Date: Mon, 20 Feb 2023 19:01:46 +0100 Subject: [PATCH] Work in progress nuovo modo di visualizzare le info --- css/custom1_4.2.css | 5 +++++ css/custom2_4.2.css | 5 +++++ index_4.2.html | 5 ++--- js/minimap.js | 12 ++++++------ js/script_4.2.js | 10 +++++++++- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/css/custom1_4.2.css b/css/custom1_4.2.css index 760ff19..c400d6b 100644 --- a/css/custom1_4.2.css +++ b/css/custom1_4.2.css @@ -22,6 +22,11 @@ body { width: 15%; } +#displayinfo { + min-height: 300px !important; + overflow: scroll !important; +} + #colVisualizza { min-height: 700px; } diff --git a/css/custom2_4.2.css b/css/custom2_4.2.css index 7b944d7..d1ffb33 100644 --- a/css/custom2_4.2.css +++ b/css/custom2_4.2.css @@ -22,6 +22,11 @@ body { width: 15%; } +#displayinfo { + min-height: 300px !important; + overflow: scroll !important; +} + #colVisualizza { min-height: 700px; } diff --git a/index_4.2.html b/index_4.2.html index 472159f..87dda59 100644 --- a/index_4.2.html +++ b/index_4.2.html @@ -416,12 +416,11 @@
-
-
Visualizza info












+
+
Visualizza info












-
diff --git a/js/minimap.js b/js/minimap.js index 1950881..2ea2250 100644 --- a/js/minimap.js +++ b/js/minimap.js @@ -97,10 +97,10 @@ function showMinimap() { realScale = Math.min((maxHeight/miniCantoHeight), 1); minimap.style.width = '100%'; - console.log("maxHeight: "+maxHeight) - console.log("maxWidth: "+maxWidth) - console.log("srcCantoHeight: "+$(currentMinimap)[0].clientHeight) - console.log("realScale: "+realScale) + //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.height = Math.trunc(miniCantoHeight) + "px"; @@ -108,8 +108,8 @@ function showMinimap() { 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) + //console.log("minimapContent.style.height: "+minimapContent.style.height) + //console.log("minimapContent.style.width: "+minimapContent.style.width) viewer.style.height = viewerHeight + "px"; viewer.style.width = viewerWidth + "px"; diff --git a/js/script_4.2.js b/js/script_4.2.js index 99d8807..39d4141 100644 --- a/js/script_4.2.js +++ b/js/script_4.2.js @@ -132,6 +132,8 @@ $(document).ready(function() { minWidth: 100, maxWidth: 350, resize: function(event, ui) { + $("#displayinfo").css("maxWidth", $(".visInfo").width()+"px"); + $("#displayinfo").css("maxHeight", $(".visInfo").height()+"px"); getDimensionsDiv(); }, stop: function(event, ui) { @@ -144,7 +146,8 @@ $(document).ready(function() { minWidth: 350, resize: function(event, ui) { ui.position.left = 0; - //$("#displaycantowrapper").width("100%"); + $("#displayinfo").css("maxWidth", $(".visInfo").width()+"px"); + $("#displayinfo").css("maxHeight", $(".visInfo").height()+"px"); getDimensionsDiv(); }, stop: function(event, ui) { @@ -159,6 +162,8 @@ $(document).ready(function() { alsoResize: "#displaycanto", resize: function(event, ui) { $("#displaycanto").width(" min-content"); + $("#displayinfo").css("maxWidth", $(".visInfo").width()+"px"); + $("#displayinfo").css("maxHeight", $(".visInfo").height()+"px"); getDimensionsDiv(); }, stop: function(event, ui) { @@ -549,6 +554,9 @@ $(document).ready(function() { // Fine variabili + $("#displayinfo").css("maxWidth", $(".visInfo").width()+"px"); + $("#displayinfo").css("maxHeight", $(".visInfo").height()+"px"); + getJsonQuery = function(){ return queryJson; }