From d179d932fac37a8aa4044eda9c4600600a46c588 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Thu, 11 Apr 2024 13:42:57 +0100 Subject: [PATCH] Update css and js for structure plot feature --- inst/www/script.js | 12 +++++++++++- inst/www/styles.css | 12 ++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/inst/www/script.js b/inst/www/script.js index 2774e9d..efd179d 100644 --- a/inst/www/script.js +++ b/inst/www/script.js @@ -108,7 +108,17 @@ function renderFeedbackWarning (file, text) { // ---------- // // Function to clear plotOutput content when Plot Data button is (re)clicked // ---------- // -function clearPlotOutput () { +function clearPlotOutput (plot) { + + // Do this for map + if (plot == "map") { document.getElementById("main_plot-admixture_map").textContent = ""; document.getElementById("main_plot-dropdown_download_bttn").classList.add("hidden"); + } + + // Do this for bar + if (plot == "bar") { + document.getElementById("bar_plot-admixture_barplot").textContent = ""; +/* document.getElementById("main_plot-dropdown_download_bttn").classList.add("hidden");*/ + } }; diff --git a/inst/www/styles.css b/inst/www/styles.css index 102bb39..71f4540 100644 --- a/inst/www/styles.css +++ b/inst/www/styles.css @@ -49,16 +49,16 @@ display: none; } -#plot_bttn-plot_bttn { +.plot-bttn { margin-top: 5px; margin-bottom: 20px; + width: 130px; } -#plot_bttn-plot_bttn:active { +.plot-bttn:active { background-color: #14a085; border-color: #fff; } - -#plot_bttn-plot_bttn > i { +.plot-bttn > i { padding-right: 5px; } @@ -139,3 +139,7 @@ .carousel-item img { padding-top: 10px; } + +.param-bttn-100px { + width: 100px !important; +}