Fixed window resize/client bug
This commit is contained in:
parent
b121d7a09d
commit
7951bd0477
@ -132,7 +132,7 @@
|
||||
</div>
|
||||
<div id="client">
|
||||
<div id="client-bar">
|
||||
<span class="client-bar-control-container">
|
||||
<span class="client-bar-control-container handle">
|
||||
<a href="#" id="client-bar-control"><i id="client-ico-up" class="fa fa-chevron-up" aria-hidden="true"></i><i id="client-ico-down" class="fa fa-chevron-down hidden" aria-hidden="true"></i><b id="client-tab-desc">Client</b></a>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -1,4 +1,16 @@
|
||||
var lastInputBox;
|
||||
$.widget("ui.resizable", $.ui.resizable, {
|
||||
resizeBy: function(newSize) {
|
||||
this._mouseStart($.Event("mousedown", { pageX: 0, pageY: 0 }));
|
||||
this.axis = 'se';
|
||||
var end = $.Event("mouseup", {
|
||||
pageX: newSize.width,
|
||||
pageY: newSize.height
|
||||
});
|
||||
this._mouseDrag(end);
|
||||
this._mouseStop(end);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
// Controls menu hide/show
|
||||
@ -70,7 +82,7 @@ $(document).ready(function() {
|
||||
$('#client-login').click(function() { reconnect();})
|
||||
$(".vertical-resize").resizable({
|
||||
handles: {
|
||||
'n': '#client-term-resize'
|
||||
'n': '.handle'
|
||||
},
|
||||
alsoResize: "#client-term-output",
|
||||
minWidth: "100%",
|
||||
@ -95,9 +107,9 @@ $(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));
|
||||
$('.vertical-resize').resizable( "option", "maxHeight", ($('.vertical-resize').parent().parent().height() * 0.95) );
|
||||
if($('.vertical-resize').height() > ($('.vertical-resize').parent().parent().height() * 0.95) ) {
|
||||
$('.vertical-resize').resizable("resizeBy", {height: '95%', width:'100%'});
|
||||
}
|
||||
});
|
||||
// Websocket client startup
|
||||
|
@ -134,7 +134,7 @@ input[type=radio]:checked + label:before {
|
||||
#client-tab-desc{ padding-left: 0.5vw;}
|
||||
|
||||
#client-term-container {
|
||||
height: 40vh;
|
||||
height: 40%;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
}
|
||||
@ -154,7 +154,7 @@ input[type=radio]:checked + label:before {
|
||||
}
|
||||
#client-term-prompt {
|
||||
width: 100%;
|
||||
height: 0.9vh;
|
||||
height: 1em;
|
||||
overflow: hidden;
|
||||
white-space: pre-wrap;
|
||||
text-align: left;
|
||||
|
Loading…
Reference in New Issue
Block a user