From 2f4ab6516d859cd7a3c2ff48390e4afd177d7b3f Mon Sep 17 00:00:00 2001 From: Sergio Eduardo Castro Ceballos <72516762+SergioCasCeb@users.noreply.github.com> Date: Wed, 10 Jan 2024 06:45:44 +0100 Subject: [PATCH] Fixed merging conflicts - Rebased the branch to fix the merging conflicts added by the new console functionality --- packages/web-new/src/scripts/console.js | 34 +++++++++---------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/packages/web-new/src/scripts/console.js b/packages/web-new/src/scripts/console.js index dc4aac14..454e426c 100644 --- a/packages/web-new/src/scripts/console.js +++ b/packages/web-new/src/scripts/console.js @@ -58,8 +58,9 @@ function expandConsole() { setTimeout(() => { mainContentElement.style.flex = "0 210px" consoleElement.style.flex = `1 0` - minMaxBtn.children[0].classList.add("fa-down-left-and-up-right-to-center") - minMaxBtn.children[0].classList.remove("fa-up-right-and-down-left-from-center") + minMaxBtn.children[0].classList.add("collapse-arrows") + minMaxBtn.children[0].classList.remove("expand-arrows") + minMaxBtn.children[0].children[0].setAttribute("d", "M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8H296c-13.3 0-24-10.7-24-24V72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272H216c13.3 0 24 10.7 24 24V440c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z") }, 100); } @@ -68,29 +69,18 @@ function expandConsole() { * and adjusts the console size as well as the expand/collapse icon */ function collapseConsole() { + textIcon.forEach(text => { + text.classList.remove("hiddenV") + }) + consoleElement.classList.remove("expanded") consoleElement.classList.add("collapsed") mainContentElement.style.flex = "1 0" consoleElement.style.flex = `0 39px` - minMaxBtn.children[0].classList.remove("fa-down-left-and-up-right-to-center") - minMaxBtn.children[0].classList.add("fa-up-right-and-down-left-from-center") -minMaxBtn.addEventListener("click", () => { - - if (minMaxBtn.children[0].classList.contains("collapse-arrows")) { - if (minMaxBtn.children[0].classList.contains("collapse-arrows")) { - mainContentElement.style.flex = "1 0" - consoleElement.style.flex = `0 39px` - minMaxBtn.children[0].classList.remove("collapse-arrows") - minMaxBtn.children[0].classList.add("expand-arrows") - minMaxBtn.children[0].children[0].setAttribute("d", "M344 0H488c13.3 0 24 10.7 24 24V168c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512H24c-13.3 0-24-10.7-24-24V344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z") - minMaxBtn.children[0].classList.remove("collapse-arrows") - minMaxBtn.children[0].classList.add("expand-arrows") - minMaxBtn.children[0].children[0].setAttribute("d", "M344 0H488c13.3 0 24 10.7 24 24V168c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512H24c-13.3 0-24-10.7-24-24V344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z") - - textIcon.forEach(text => { - text.classList.remove("hiddenV") - }) + minMaxBtn.children[0].classList.remove("collapse-arrows") + minMaxBtn.children[0].classList.add("expand-arrows") + minMaxBtn.children[0].children[0].setAttribute("d", "M344 0H488c13.3 0 24 10.7 24 24V168c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512H24c-13.3 0-24-10.7-24-24V344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z") } minMaxBtn.addEventListener("click", () => { @@ -103,7 +93,7 @@ minMaxBtn.addEventListener("click", () => { /** - * Unchecks all visualization btns and hides all visualization containers + * Unchecks all visualization buttons and hides all visualization containers */ export function clearConsole() { visualizationContainers.forEach(container => { @@ -134,7 +124,7 @@ function clearVisualizationEditors() { //Set the behavior for each visualization tab when clicked on it visualizationOptions.forEach(option => { option.addEventListener("click", () => { - if(consoleElement.classList.contains("collapsed")){ + if (consoleElement.classList.contains("collapsed")) { expandConsole() } clearVisualizationEditors()