allow multiple SecNode connections

+ change layout when console is not to be shown
+ catch file not found error
This commit is contained in:
l_samenv
2024-09-25 16:31:58 +02:00
parent 96bcd67dc4
commit 69ea17aec6
3 changed files with 95 additions and 53 deletions

View File

@ -73,10 +73,10 @@ new Settings()
.treat("debugGraphics", "dg", to_bool, false)
.treat("hostPort", "hp", 0, location.hostname + ":" + location.port)
.treat("showMain", "sm", to_bool, true)
.treat("showConsole", "sc", to_bool, true)
.treat("showConsole", "sc", to_bool, false)
.treat("showOverview", "so", to_bool, false)
.treat("showGraphics", "sg", to_bool, true) // false)
.treat("hideRightPart", "hr", to_bool, true) //used to completely disable the right part
.treat("hideRightPart", "hr", to_bool, false) //used to completely disable the right part
.treat("wideGraphs", "wg", to_bool, false) //used to toggle the size of the graphs part
.treat("showAsync", "sa", to_bool, false)

View File

@ -94,7 +94,7 @@ function adjustGrid() {
case 2:
rightWidth = Math.min(50, MINWIDTH / width * 100);
leftWidth = 100 - rightWidth;
if (nRows == 1) {
if (nRows == 1 || !window['showConsole']) {
style(0,leftWidth + "vw","100vh");
style(1,rightWidth + "vw","100vh");
style(2); // hide
@ -109,7 +109,7 @@ function adjustGrid() {
case 3:
rightWidth = MINWIDTH / width * 100;
leftWidth = 100 - rightWidth;
if (nRows == 1) {
if (nRows == 1 || !window['showConsole']) {
style(0,leftWidth + "vw","100vh");
style(1,rightWidth + "vw","100vh");
style(2); // hide
@ -124,11 +124,16 @@ function adjustGrid() {
case 4:
rightWidth = MINWIDTH / width * 100;
leftWidth = 100 - 2 * rightWidth;
if (nRows == 1) {
if (nRows == 1 || !window['showConsole']) {
style(0,leftWidth + "vw","100vh");
style(1,rightWidth + "vw","100vh");
style(2); // hide
style(3,rightWidth + "vw","100vh");
if (window['showConsole']) {
style(2); // hide
style(3,rightWidth + "vw","100vh");
} else {
style(2,rightWidth + "vw","100vh");
style(3); // hide
}
} else {
style(0,leftWidth + "vw","100vh");
style(1,rightWidth + "vw","50vh");