Skip to content

Commit

Permalink
Do not remove all styles with Touch ViewHeight calculator but only he…
Browse files Browse the repository at this point in the history
…ight
  • Loading branch information
Paul de Vries committed Nov 1, 2015
1 parent 35e121a commit 6c3c883
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions octoprint_touchui/static/js/includes/scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
// Covert VH to the initial height (prevent height from jumping when navigation bar hides/shows)
$("#temperature-graph").height($("#temperature-graph").outerHeight());
$("#terminal-scroll").height($("#terminal-scroll").outerHeight());
$("#terminal-sendpanel").css("top", $("#terminal-scroll").outerHeight());
$("#terminal-sendpanel").css("top", $("#terminal-scroll").outerHeight()-1);

$(window).on("resize", function() {

if(width !== $(window).width()) {
$("#temperature-graph").attr("style", "").height($("#temperature-graph").outerHeight());
$("#terminal-scroll").attr("style", "").height($("#terminal-scroll").outerHeight());
$("#terminal-sendpanel").attr("style", "").css("top", $("#terminal-scroll").outerHeight());
$("#temperature-graph").css("height", "").height($("#temperature-graph").outerHeight());
$("#terminal-scroll").css("height", "").height($("#terminal-scroll").outerHeight());
$("#terminal-sendpanel").css("top", $("#terminal-scroll").outerHeight()-1);
width = $(window).width();
}

Expand Down

0 comments on commit 6c3c883

Please sign in to comment.