diff --git a/assets/js/pages/gwas_region.js b/assets/js/pages/gwas_region.js index 593cbea..a705d4d 100644 --- a/assets/js/pages/gwas_region.js +++ b/assets/js/pages/gwas_region.js @@ -23,7 +23,7 @@ function makePlot(template_vars) { const app_params = Object.assign( { lz_sources: getBasicSources(assoc_sources), - lz_layout: getBasicLayout(state, panels, { responsive_resize: false }), + lz_layout: getBasicLayout(state, panels, { responsive_resize: true }), study_names: [template_vars.label], top_hits_url: template_vars.top_hits_url, }, template_vars, diff --git a/assets/vue/gwas_region.vue b/assets/vue/gwas_region.vue index 09a9c53..0530160 100644 --- a/assets/vue/gwas_region.vue +++ b/assets/vue/gwas_region.vue @@ -39,6 +39,11 @@ // After plot is created, initiate metrics capture // TODO: This is a mite finicky; consider further refactoring in the future? this.$refs.plotWidget.$refs.assoc_plot.callPlot(setup_feature_metrics); + // FIXME: In tabbed UI, Bootstrap-vue has an issue where the tab panel is not fully initialized when + // content area is rendered. The result is that the plot width is slightly incorrect. Redrawing + // after a small delay helps to ensure that the plot is not truncated off the edge of the screen. + // This can be removed if we move away from the "tab/sidebar" UI design. + setTimeout(() => this.$refs.plotWidget.$refs.assoc_plot.callPlot((plot) => plot.rescaleSVG())); }, activateBatchMode(regions) { this.batch_mode_active = true; diff --git a/locuszoom_plotting_service/templates/gwas/gwas_region.html b/locuszoom_plotting_service/templates/gwas/gwas_region.html index aa4b527..cf35424 100644 --- a/locuszoom_plotting_service/templates/gwas/gwas_region.html +++ b/locuszoom_plotting_service/templates/gwas/gwas_region.html @@ -4,7 +4,7 @@ {% block title %}Region plot- {{ gwas.label }}{% endblock %} {% block content %} -
+