Skip to content

Commit

Permalink
Fix #62: make images resize when the sidebar collapses/expands (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
bborgesr committed Feb 23, 2017
1 parent 79f5039 commit 7ae59f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
shinydashboard 0.5.3.9000
=========================

* Fixed [#62](https://github.com/rstudio/shinydashboard/issues/62): make images resize when the sidebar collapses/expands. [#185](https://github.com/rstudio/shinydashboard/pull/185)

* Addressed [#178](https://github.com/rstudio/shinydashboard/issues/178): switch from `npm` to `yarn`. Also upgraded all yarn packages to the `latest` tag (all major changes). [#184](https://github.com/rstudio/shinydashboard/pull/184)

* Fixed [#176](https://github.com/rstudio/shinydashboard/issues/176) (making buttons look good on the sidebar) by giving Shiny action buttons and links some margin space. ([#182](https://github.com/rstudio/shinydashboard/pull/182))
Expand Down
5 changes: 5 additions & 0 deletions inst/shinydashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ $(function() {
$(".navbar > .sidebar-toggle").hide();
}

// Trigger the resize event when the sidebar is collapsed/expanded
// (this allows images to be responsive and resize themselves)
$(document).on("click", ".sidebar-toggle", function() {
$(window).trigger("resize");
});

// menuOutputBinding
// ------------------------------------------------------------------
Expand Down

0 comments on commit 7ae59f9

Please sign in to comment.