Auto-shrink client window and constrain

This commit is contained in:
Robert L 2018-01-16 16:02:11 -05:00
parent f227cc477a
commit 10b0b7f4db

View File

@ -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();