Skip to content

Commit

Permalink
Enable fullscreen display of plots
Browse files Browse the repository at this point in the history
  • Loading branch information
abought committed Apr 13, 2021
1 parent 6f2f923 commit 2beca9b
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 34 deletions.
2 changes: 1 addition & 1 deletion assets/js/pages/gwas_region.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions assets/vue/gwas_region.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion locuszoom_plotting_service/templates/gwas/gwas_region.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block title %}Region plot- {{ gwas.label }}{% endblock %}

{% block content %}
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
Expand Down
59 changes: 30 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"homepage": "https://github.com/statgen/locuszoom-hosted#readme",
"dependencies": {
"bootstrap": "^4.5.3",
"bootstrap-vue": "^2.18.0",
"bootstrap-vue": "^2.21.2",
"d3": "^5.16.0",
"d3-tip": "0.9.1",
"gwas-credible-sets": "^0.1.0",
"localzoom": "https://github.com/statgen/localzoom#v0.7.2",
"locuszoom": "^0.13.1",
"localzoom": "https://github.com/statgen/localzoom#867247a",
"locuszoom": "^0.13.2",
"lodash": "^4.17.20",
"pako": "^1.0.11",
"tabulator-tables": "^4.1.4",
Expand Down

0 comments on commit 2beca9b

Please sign in to comment.