diff --git a/src/web/stylesheets/layout/_io.css b/src/web/stylesheets/layout/_io.css index bdee4a4c..247bfddd 100755 --- a/src/web/stylesheets/layout/_io.css +++ b/src/web/stylesheets/layout/_io.css @@ -27,7 +27,6 @@ #output-wrapper{ margin: 0; padding: 0; - height: calc(100% - var(--title-height)); } #output-wrapper .textarea-wrapper { @@ -154,9 +153,26 @@ width: fit-content; } +#input-wrapper, +#output-wrapper, +#input-wrapper > * , +#output-wrapper > .textarea-wrapper > #output-loader { + height: calc(100% - var(--title-height)); +} + +#input-wrapper.show-tabs, +#input-wrapper.show-tabs > *, +#output-wrapper.show-tabs, +#output-wrapper > .textarea-wrapper > #output-loader { + height: calc(100% - var(--tab-height) - var(--title-height)); +} + +#output-wrapper > .textarea-wrapper > * { + height: 100%; +} + .input-wrapper.textarea-wrapper { width: 100%; - height: calc(100% - var(--title-height)); box-sizing: border-box; overflow: hidden; pointer-events: auto; @@ -175,7 +191,6 @@ left: 0; bottom: 0; width: 100%; - height: calc(100% - var(--title-height)); padding: 3px; margin: 0; overflow: hidden; @@ -193,7 +208,6 @@ bottom: 0; left: 0; width: 100%; - height: calc(100% - var(--title-height)); margin: 0; background-color: var(--primary-background-colour); visibility: hidden; @@ -232,7 +246,6 @@ left: 0; bottom: 0; width: 100%; - height: calc(100% - var(--title-height)); display: none; } diff --git a/src/web/waiters/InputWaiter.mjs b/src/web/waiters/InputWaiter.mjs index 869e5854..90f52bbb 100644 --- a/src/web/waiters/InputWaiter.mjs +++ b/src/web/waiters/InputWaiter.mjs @@ -314,7 +314,7 @@ class InputWaiter { */ bakeAll() { this.app.progress = 0; - this.manager.controls.toggleBakeButtonFunction("loading"); + this.app.debounce(this.manager.controls.toggleBakeButtonFunction, 20, "toggleBakeButton", this, ["loading"]); this.inputWorker.postMessage({ action: "bakeAll" }); diff --git a/src/web/waiters/TabWaiter.mjs b/src/web/waiters/TabWaiter.mjs index fd4689c5..6e4df13d 100644 --- a/src/web/waiters/TabWaiter.mjs +++ b/src/web/waiters/TabWaiter.mjs @@ -209,15 +209,8 @@ class TabWaiter { document.getElementById("input-tabs-wrapper").style.display = "block"; document.getElementById("output-tabs-wrapper").style.display = "block"; - document.getElementById("input-wrapper").style.height = "calc(100% - var(--tab-height) - var(--title-height))"; - document.getElementById("input-highlighter").style.height = "calc(100% - var(--tab-height) - var(--title-height))"; - document.getElementById("input-file").style.height = "calc(100% - var(--tab-height) - var(--title-height))"; - - document.getElementById("output-wrapper").style.height = "calc(100% - var(--tab-height) - var(--title-height))"; - document.getElementById("output-highlighter").style.height = "calc(100% - var(--tab-height) - var(--title-height))"; - document.getElementById("output-file").style.height = "calc(100% - var(--tab-height) - var(--title-height))"; - document.getElementById("output-loader").style.height = "calc(100% - var(--tab-height) - var(--title-height))"; - document.getElementById("show-file-overlay").style.top = "calc(var(--tab-height) + var(--title-height) + 10px)"; + document.getElementById("input-wrapper").classList.add("show-tabs"); + document.getElementById("output-wrapper").classList.add("show-tabs"); document.getElementById("save-all-to-file").style.display = "inline-block"; } @@ -229,15 +222,8 @@ class TabWaiter { document.getElementById("input-tabs-wrapper").style.display = "none"; document.getElementById("output-tabs-wrapper").style.display = "none"; - document.getElementById("input-wrapper").style.height = "calc(100% - var(--title-height))"; - document.getElementById("input-highlighter").style.height = "calc(100% - var(--title-height))"; - document.getElementById("input-file").style.height = "calc(100% - var(--title-height))"; - - document.getElementById("output-wrapper").style.height = "calc(100% - var(--title-height))"; - document.getElementById("output-highlighter").style.height = "calc(100% - var(--title-height))"; - document.getElementById("output-file").style.height = "calc(100% - var(--title-height))"; - document.getElementById("output-loader").style.height = "calc(100% - var(--title-height))"; - document.getElementById("show-file-overlay").style.top = "calc(var(--title-height) + 10px)"; + document.getElementById("input-wrapper").classList.remove("show-tabs"); + document.getElementById("output-wrapper").classList.remove("show-tabs"); document.getElementById("save-all-to-file").style.display = "none"; } diff --git a/src/web/waiters/WorkerWaiter.mjs b/src/web/waiters/WorkerWaiter.mjs index 98e000da..ec2a8f64 100644 --- a/src/web/waiters/WorkerWaiter.mjs +++ b/src/web/waiters/WorkerWaiter.mjs @@ -281,7 +281,7 @@ class WorkerWaiter { */ setBakingStatus(bakingStatus) { this.app.baking = bakingStatus; - this.manager.controls.toggleBakeButtonFunction(bakingStatus ? "cancel" : "bake"); + this.app.debounce(this.manager.controls.toggleBakeButtonFunction, 20, "toggleBakeButton", this, [bakingStatus ? "cancel" : "bake"])(); if (bakingStatus) this.manager.output.hideMagicButton(); }