function setSidebarState()

in frontend/src/assets/js/toolWindows.js [187:220]


function setSidebarState() {
    let ActiveToolWindows = 0
    $(".toolWindowButton").each(function () {
        if ($(this).hasClass("active")) {
            ActiveToolWindows++
        }
    })
    if (ActiveToolWindows === 0) {
        $("#sidebar").hide()
        $("#file-analyzer .resizer").hide()
        setToolWindowHeight()
    } else if (ActiveToolWindows === 1) {
        $("#sidebar").show()
        $("#file-analyzer>.container>.resizer").show()
        $("#sidebar .resizer").hide()
        setToolWindowHeight()
    } else {
        $("#sidebar").show()
        $("#file-analyzer .resizer").show()
        setToolWindowHeight()
    }
    function setToolWindowHeight() {
        let bot = $("#toolWindows .bot")
        let top = $("#toolWindows .top")
        if (!bot.find(":visible").html()){
            top.css("height", "100%")
        } else if (!top.find(":visible").html()) {
            bot.css("height", "100%")
        } else {
            top.css("height", "50%")
            bot.css("height", "50%")
        }
    }
}