From 10b0b7f4db2efea334aa37ce1b8fb11e074dd1ae Mon Sep 17 00:00:00 2001 From: Robert L Date: Tue, 16 Jan 2018 16:02:11 -0500 Subject: [PATCH] Auto-shrink client window and constrain --- js/GUI.Utils.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/GUI.Utils.js b/js/GUI.Utils.js index 9e7c365..6ed43ef 100644 --- a/js/GUI.Utils.js +++ b/js/GUI.Utils.js @@ -75,6 +75,7 @@ $(document).ready(function() { alsoResize: "#client-term-output", minWidth: "100%", maxWidth: "100%", + maxHeight: ($(window).height() * 0.95), stop: function(event, ui) { $(this).css("width", ''); $('#client-term-output').css("width",''); @@ -93,6 +94,12 @@ $(document).ready(function() { } }); + $(window).resize(function() { + $('.vertical-resize').resizable( "option", "maxHeight", ($(window).height() * 0.95) ); + if($('.vertical-resize').height() > ($(window).height() * 0.95) ) { + $('.vertical-resize').height(($(window).height() * 0.95)); + } + }); // Websocket client startup startup();