Skip to content

Commit

Permalink
Fixed merging conflicts
Browse files Browse the repository at this point in the history
- Rebased the branch to fix the merging conflicts added by the new console functionality
  • Loading branch information
SergioCasCeb committed Jan 10, 2024
1 parent 2c946ab commit 2f4ab65
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions packages/web-new/src/scripts/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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", () => {
Expand All @@ -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 => {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 2f4ab65

Please sign in to comment.