"use strict"; //begin here //this function, and associated functions, are responsible //for organizing minimized windows into a stack formation //at the left of the page. if no minimized windows are //present, then it hides the stow minimized window //box/button. otherwise, it will display the box/button. function minimize_window_main(win = null) { var minimized_count = null; var scroll_box = null; var minimized_table = null; //returns minimized window count minimized_count = minimized_window_count(); //2024-04-12: //creating a feature that allows you to stow/hide all minimized windows. //see file: 'stow_minimized_windows.js'. Whenever a minimize window icon is //clicked down upon (onmousedown), the 'stow minimized windows' box/button is //created. By default, it is set to display as "none" upon creation. Since //this function is called when the user minimizes a window, make the box/button //visible. In the case where there are no minimized windows, the box/button will be //displayed as "none". See the 'else' condition below. It will hide the box/button //if there are no minimized windows prsesent. show_stow_minimized_window_box(); //if there is at least 1 minimized window, show the scroll box and minimize table/menu if (minimized_count > 0) { //create the scroll box if it does not exist. scroll_box = make_scroll_box(); //create the minimize window table minimized_table = make_minimized_table(); scroll_box.appendChild(minimized_table); //place windows into minimized menu place_min_windows(minimized_table); //sets all minimized windows to be fixed, not absolute. set_all_minimized_wins_position_fixed(); //initializes scroll box, and minimized //windows table for scrolling. ////init_components_for_scrolling_minimized(); } else { //else remove the scroll box and minimize table/menu delete_scroll_box_and_minimize_table(); //2024-04-12: //TEST: creating a feature that allows you to stow/hide all minimized windows. //if there are no minimized windows present, then hide the box/button to stow //minimized windows. //see file: 'stow_minimized_windows.js' setTimeout(function () { hide_stow_minimized_window_box(); }, 300); //2024-04-23: //this function hides the small icon that retracts the stowed minimized windows //and the box/button that stows minimized windows. //see file: 'hide_show_stowed.js' setTimeout(function () { hide_tuck_stowed_minimized_window_icon(); }, 300); } //This is used during testing. It displays a small blue box at //the Y position of the page where the Y offset location should be. //this depends on the existence and "block" display of the main menu //spanning the top of the page. This functionality also does the same // with the tabbed window tab boxes that is also place at the top //of the browser window. See the file: 'testing.js'. if (global_test_mode === true) { offset_Y_test_marker_image(get_page_offset_Y()); } } //place window into the side table/menu function place_min_windows(minimized_table) { var placeholders = null; var ph_count = null; var w_count = null; var ph = null; var i = null; var w = null; var x = null; var y = null; var windows = null; //2024-04-13: //This line of code has been modified to include the Y offset of the "stow minimized windows box". //for the function 'get_minimized_windows_offset_Y()', see file: 'stow_minimized_windows.js' minimized_table.style.top = (get_page_offset_Y() - get_tabbed_window_bar_offset_Y() - get_minimized_windows_offset_Y() - 10) + "px"; //offsets the top by the height of the top menu being 37px, and other object that spans the top of the screen as well. This includes the 'stow minimized window' box/button. placeholders = document.getElementsByName("minimize_placeholder"); ph_count = placeholders.length; windows = get_all_minimized_windows(); w_count = windows.length; for (i = 0; i < ph_count; i++) { ph = placeholders[i]; w = document.getElementById(windows[i]); x = parseFloat(ph.offsetLeft); y = parseFloat(ph.offsetTop); w.style.left = parseFloat(x) + "px"; //w.style.top = (parseFloat(y) + get_scroll_box_offset_y()) + "px"; w.style.top = (parseFloat(y) + get_page_offset_Y() - get_tabbed_window_bar_offset_Y() + get_minimized_windows_offset_Y()) + "px"; //if ((y + ph.scrollTop) > window.innerHeight) { //} //else { adjust_scroll_box_width_on_overflow_y(); adjust_stow_minimized_windows_box_width_on_overflow_y(); w.style.width = (parseFloat(ph.offsetWidth) - 9) + "px"; ////w.style.width = (parseFloat(ph.offsetWidth) - 10) + "px"; //} //2024-03-21: //the function called below for the purpose of setting //the minimized table top location. the Y offset of the page //based upon the top menu spanning the page, as well as //the tabbed window tabs container if they exists and are displayed. //see file 'common_functions.js' ////minimized_table.style.top = get_scroll_box_offset_y() + "px"; //offsets the top by the height of the top menu being 37px, and other object that spans the top of the screen as well. //2024-04-13: //This line of code has been modified to include the Y offset of the "stow minimized windows box". //for the function 'get_minimized_windows_offset_Y()', see file: 'stow_minimized_windows.js' ////minimized_table.style.top = (get_page_offset_Y() - get_tabbed_window_bar_offset_Y() + get_minimized_windows_offset_Y()) + "px"; //offsets the top by the height of the top menu being 37px, and other object that spans the top of the screen as well. This includes the 'stow minimized window' box/button. w.style.boxShadow = global_hide_window_dropshadow; } //2024-05-18: //set all windows' zIndex property in order. tabbed windows are set //with the lowest zIndex. cascaded windows are set next. minimized //windows are set next. finally, the maximized window(s) are set. //see file: 'window_2.js' ////reset_all_window_zIndexes(); ////set_all_window_zIndexes(); ////move_all_minimized_windows_to_front(); ////move_all_maximized_windows_to_front(); } //this functions (re)creates the background scrolling box function make_scroll_box() { var scroll_box = null; var exists = null; var desktop = null; var minimized_table = null; //if scroll box exists, delete it exists = scroll_box_exists(); //scroll box element exists true/false if (exists === true) { //scroll box exists exists, delete it delete_scroll_box(); } else if (exists === false) { //scroll box does not exist //continue... } //create the scroll box object scroll_box = create_scroll_box_obj(); desktop = document.getElementById("desktop"); //grab the desktop layer, if it exists if (desktop !== null) { //desktop element exists //desktop.appendChild(scroll_box); desktop.insertBefore(scroll_box, desktop.childNodes[0]); } else { //desktop element does not exist //if we can't append the object to the desktop, we append it to the body //document.body.appendChild(scroll_box); document.body.insertBefore(scroll_box, document.body.childNodes[0]); } //add the event listeners to the scroll box scroll_box = scroll_box_add_event_listeners(scroll_box); return scroll_box; } //creates the scroll box as an object function create_scroll_box_obj() { var scroll_box = null; var y_offset = null; ////y_offset = get_scroll_box_offset_y(); //2024-03-21: //this function call dtermines the Y offset of the page //based upon the top menu spanning the page, as well as //the tabbed window tabs container if they exists and are displayed. //see file 'common_functions.js' //2024-04-13: //UPDATE: added the Y offset parameter of the 'stow minimized window' box. //for the function ' get_minimized_windows_offset_Y()', //see file 'stow_minimized_windows.js' y_offset = get_page_offset_Y() - get_tabbed_window_bar_offset_Y() + get_minimized_windows_offset_Y(); scroll_box = document.createElement("div"); scroll_box.setAttribute("id", "scroll_box"); scroll_box.style.position = "fixed"; //2024-02-15: //If there are minimized windows present, then set the tabbed //window's left margin to a width that allows the minimized //windows to be displayed. If there are no minimized windows //present, the margin for tabbed windows will be set to 0. ////scroll_box.style.left = "0"; ////win.style.left = (3 + parseFloat(tabbed_window_left_margin)) + "px"; //2024-1-18: //This code tells me what the top and height //of the top menu bar with the most accuracy. //If the menu bar doesn't exist, then the //value defaults to 31 pixels. if (y_offset !== null && typeof y_offset === "number" && y_offset > 0) { //2024-03-21: //commented the line of code below scroll_box.style.top = y_offset + "px"; } else { //2024-03-21: //commented the line below scroll_box.style.top = "31px"; //offsets the top by the height of the top menu being 37px } scroll_box.style.width = "330px"; //defaults to a width slightly wider than the minimized window scroll_box.style.height = "calc(100% - " + scroll_box.style.top + ")"; //(window.innerHeight - 37) + "px"; //the scroll box will have the same height as the browser window scroll_box.style.backgroundColor = "rgba(0,0,255,0.0)"; scroll_box.style.display = "block"; if (global_test_mode === true) { ////scroll_box.style.opacity = 0.5; scroll_box.style.backgroundColor = "rgba(153,153,255,0.35)"; } scroll_box.style.overflowX = "hidden"; scroll_box.style.overflowY = "auto"; //scroll_box.style.filter = "blur(0.5px)"; ////tabbed_window_left_margin = parseFloat(scroll_box.offsetWidth); //get_tabbed_windows_left_margin(); ////offset_tabbed_windows_left(tabbed_window_left_margin); return scroll_box; } //2024-1-18: //This function gets the vertical offset height //from the top of the screen's browser window, //down to the lowest horizontal menu bar at the top //of the screen. function get_scroll_box_offset_y() { var offset_y = null; var elem = null; var elem_height = null; //This code is to find the vertical height of a menu bar //spanning the very top of the screen. elem = document.getElementById("div_wrapper_0"); if (elem !== null) { elem_height = parseFloat(elem.scrollHeight); offset_y = parseFloat(elem_height); } //This code is to find the vertical height //of a tabbed window container that spans the width //of the computer screen, as well. It is located directly //below the menu bar at the top of the screen. elem = document.getElementById("tabbed_windows_container"); if (elem !== null) { elem_height = parseFloat(elem.scrollHeight); offset_y = parseFloat(offset_y) + parseFloat(elem_height); } //I'm going to need to offset the Y offset in order to add //a feature that allows all minimized windows to be, well, //minimized. I'm going create a header element on the stack //of minimized windows. When you click on it, the stack of //minimized windows will retract going leftward off the screen. //Anytime you need to display the stack of minimized windows, //you just click on the header. //Also, for the tab_windows_exist() function, see file: 'tab_windows.js' ////if (!tabbed_windows_exist()) { ////offset_y = parseFloat(offset_y) + 33; ////} ////else { ////offset_y = parseFloat(offset_y) - 15; //} ////offset_y = parseFloat(offset_y) + 33; //alert(offset_y); return offset_y; } //adds the event listeners to the scroll box (for scrolling up/down) function scroll_box_add_event_listeners(scroll_box) { var scroll_distance = null; scroll_box.addEventListener("scroll", function (event) { init_components_for_scrolling_minimized(); scroll_distance = this.offsetTop; scroll_minimized_items(scroll_distance); console.log("scroll box scrolling value for Y: " + console.log(scroll_distance)); event.stopImmediatePropagation(); event.stopPropagation(); event.preventDefault(); return; }, { passive: false, capture: false, cancelable: true, bubbles: false }); window.addEventListener("resize", function () { ////scroll_box.style.height = "100%"; // (window.innerHeight - 37) + "px"; //the scrollbox's top position is 37px. Make it 37px shorter to fit screen ////scroll_box.style.height = "calc(" + window.innerHeight + "px - " + get_total_Y_offset_height() + "px)"; scroll_box.style.height = "calc(100%)"; }); return scroll_box; } function init_components_for_scrolling_minimized() { var minimized_menu = null; var scroll_box = null; set_all_minimized_wins_position_fixed(); minimized_menu = document.getElementById("minimized_menu"); if (minimized_menu !== null) { minimized_menu.style.position = "absolute"; } scroll_box = document.getElementById("scroll_box"); if (scroll_box !== null) { scroll_box.style.position = "fixed"; scroll_box.style.overflowY = "auto"; ////scroll_box.style.height = "calc("+ window.innerHeight +"px - " + get_total_Y_offset_height() + "px)"; // "inherit"; // "calc(100% - " + get_page_offset_Y() + "px)"; ////scroll_box.style.height = "calc(100% - " + get_total_Y_offset_height() + "px)"; } } //may not be working. not in use. function get_total_Y_offset_height() { var offset_y = null; offset_y = (get_page_offset_Y() - (get_tabbed_window_bar_offset_Y()) - (get_minimized_windows_offset_Y())) + "px"; if (!isNaN(offset_y) !== true) { offset_y = 0.0; } return offset_y; } //returns true if scroll box exists in the document function scroll_box_exists() { var scroll_box = null; scroll_box = document.getElementById("scroll_box"); if (scroll_box !== null) { return true; } else { return false; } } //hides (does not remove) the scroll box function hide_scroll_box() { var scroll_box = null; scroll_box = document.getElementById("scroll_box"); if (scroll_box !== null) { scroll_box.style.display = "none"; } } //displays (does not create) the scroll box function show_scroll_box() { var scroll_box = null; scroll_box = document.getElementById("scroll_box"); if (scroll_box !== null) { scroll_box.style.display = "block"; } } //removes/deletes the scroll box element function delete_scroll_box() { var scroll_box = null; if (scroll_box_exists() === true) { scroll_box = document.getElementById("scroll_box"); scroll_box.parentNode.removeChild(scroll_box); } } //creates the minimized table/menu function make_minimized_table() { var minimized_table = null; var exists = null; var scroll_box = null; //if minimized_table exists, delete it exists = minimized_table_exists(); //minimized_table element exists true/false if (exists === true) { //minimized_table exists, delete it delete_minimized_table(); } else if (exists === false) { //minimized table does not exist //continue... } //create the minimized table object minimized_table = create_minimized_table_obj(); return minimized_table; } //creates the actual minimized table/menu object function create_minimized_table_obj() { var td = null; var tr = null; var x_pos = null; var y_pos = null; var right_pos = null; var bottom_pos = null; var include_all_windows = null; var windows = null; var window_count = null; var win_height = 32; var win_width = 330; var table_content = null; var img = null; var i = null; var tbl = null; var minimized_table = null; var tbl_exists = null; var window_obj = null; var win_id = null; var minimized_window_count = null; var win_title = null; //get the number of windows minimized_window_count = get_all_minimized_windows().length; //if the minimized table currently exists, remove it to create a new one if (minimized_table_exists() === true) { delete_minimized_table(); } //create the minimized window table minimized_table = document.createElement("table"); minimized_table.setAttribute("id", "minimized_menu"); if (global_test_mode === "true" || global_test_mode === true) { minimized_table.setAttribute("bgcolor", "#bbbbff"); minimized_table.setAttribute("border", "1"); minimized_table.style.opacity = 0.85; } else { minimized_table.style.background = "none"; minimized_table.setAttribute("border", "0"); minimized_table.style.opacity = 0.0; } minimized_table.setAttribute("cellpadding", "0"); minimized_table.setAttribute("cellspacing", "0"); minimized_table.style.position = "absolute"; minimized_table.style.left = "0"; //2024-03-21: //this function call dtermines the Y offset of the page //based upon the top menu spanning the page, as well as //the tabbed window tabs container if they exists and are displayed. //see file 'common_functions.js' minimized_table.style.top = (get_page_offset_Y() - get_tabbed_window_bar_offset_Y() - get_minimized_windows_offset_Y()) + "px"; ////minimized_table.style.top = (get_page_offset_Y() - get_tabbed_window_bar_offset_Y() - 4) + "px"; ////minimized_table.style.top = get_scroll_box_offset_y() + "px"; //offsets the top by the height of the top menu being 37px, and other object that spans the top of the screen as well. ////minimized_table.style.top = "0"; //minimized_table.style.height = (33 * minimized_window_count) + "px"; minimized_table.style.margin = "0"; minimized_table.style.padding = "0"; //not sure if I want to list just minimized, or //all tables in the minimized window //menu(non - minimized windows will show a //blank space with their title in place) include_all_windows = false if (include_all_windows === true) { windows = get_all_open_windows(); //get all windows, minimized or not } else { windows = get_all_minimized_windows(); //get only minimized windows } window_count = windows.length; //number of windows in collection if (window_count > 0) { for (i = 0; i < window_count; i++) { //get the window and its ID to be minimized window_obj = document.getElementById(windows[i]); win_id = window_obj.id; //create a new table row with width and height tr = document.createElement("tr"); //create a new table cell with width and height td = document.createElement("td"); td.setAttribute("id", win_id + "_minimize_td_" + ((i * 32))); td.setAttribute("name", "minimize_placeholder"); td.style.width = win_width + "px"; td.style.height = win_height + "px"; td.style.padding = "0"; td.style.margin = "0"; td.style.backgroundColor = "rgba(0,0,0,0.0)"; win_title = get_window_title(win_id); //get the window title //the win_title and its div are no longer being used. Setting display to 'none' for an easy and fixable solution. No need to delete it. win_title = "
"; td.innerHTML = win_title; //place the title into the matching table cell //append it together tr.appendChild(td); minimized_table.appendChild(tr); } } return minimized_table; } //depreciated, but keeping it here for reference. Supposed to populate the minimize table/menu function populate_minimized_win_table() { var get_minimized_wins = null; var minimized_win_count = null; var place_holders = null; var ph_count = null; var w = null; var i = null; var ph = null; var x = null; var y = null; var top = null; var left = null; var win_left = null; var win_top = null; get_minimized_wins = get_all_minimized_windows(); //get an array of all minimized windows place_holders = document.getElementsByName("minimize_placeholder"); //get array of all place holders in the minimize menu/table //if we have a collection of minimized windows if (get_minimized_wins !== null) { //if we have a collection pf placeholders if (place_holders !== null) { ph_count = place_holders.length; //get the number of placeholders available in the minimized window table/menu minimized_win_count = get_minimized_wins.length; //get the number of (minimized or all) windows //if the number of placeholders matches the number of windows in the array //alert("Does " + ph_count + " === " + minimized_win_count + "?"); if (minimized_win_count === ph_count) { //if there are minimized windows if (minimized_win_count > 0 && minimized_win_count !== null) { //if there are placeholders if (ph_count > 0 && ph_count !== null) { //for each placeholder in the minimized window menu/table for (i = 0; i < ph_count; i++) { ph = place_holders[i]; //get an individual place holder w = document.getElementById(get_minimized_wins[i]); //get corresponding window w.style.opacity = 1.0; if (ph !== null && w !== null) { //alert(w.id); ph_left = parseFloat(ph.style.left); //get the window destination (left) ph_top = parseFloat(ph.style.top); //get the window destination (top) win_left = parseFloat(w.style.left); //get the window's current left coordinate win_top = parseFloat(w.style.top); //get the window's current top coordinate //if window is below the placeholder, move up if (win_top > ph_top) { move_elem_top(w, (ph_top + 31), 1, 30); //move the minimized table to the minimized windows table/menu. Y axis } //if window is above placeholder, move down else if (win_top < ph_top) { move_elem_bottom(w, (ph_top + 31), 1, 30); //move the minimized table to the minimized windows table/menu. Y axis } move_elem_left(w, 0, 1, 30); //since all minimized windows are docked to the left of the screen, just call this function } } } } } } } } //counts the number of minimized windows function minimized_window_count() { var wins = null; var w = null; var is_minimized = null; var item_count = null; var i = null; item_count = 0; wins = document.getElementsByName("web_window"); for (i = 0; i < wins.length; i++) { w = wins[i]; is_minimized = w.getAttribute("data-is_minimized"); if (is_minimized === "true" ) { item_count++; } } return item_count; } //returns true if the minimize table/menu exists function minimized_table_exists() { var minimized_table = null; minimized_table = document.getElementById("minimized_menu"); if (minimized_table !== null) { return true; } else { return false; } } //hides (does not remove) the minimize table/menu function hide_minimized_table() { var minimized_table = null; minimized_table = document.getElementById("minimized_menu"); if (minimized_table !== null) { minimized_table.style.display = "none"; } } //displays (not creates) the minimize table/menu function show_minimized_table() { var minimized_table = null; minimized_table = document.getElementById("minimized_menu"); if (minimized_table !== null) { minimized_table.style.display = "block"; } } //removes/deletes the minimize table/menu from the document function delete_minimized_table() { var minimized_table = null; if (minimized_table_exists() === true) { minimized_table = document.getElementById("minimized_menu"); minimized_table.parentNode.removeChild(minimized_table); } } //when the scroll box is scrolled, this function changes the Y location of all minimized windows in the minimize table/menu function scroll_minimized_items(scroll_distance) { var wins = null; var i = null; var w = null; var is_minimized = null; var minimized_count = null; minimized_count = 0; wins = document.getElementsByName("web_window"); for (i = 0; i < wins.length; i++) { w = wins[i]; is_minimized = w.getAttribute("data-is_minimized"); if (is_minimized === "true") { if (parseFloat(w.style.left) < 1) { if (w.getAttribute("data-is_minimized") === "true") { minimized_count++; //2024-03-21: //this function call dtermines the Y offset of the page //based upon the top menu spanning the page, as well as //the tabbed window tabs container if they exists and are displayed. //see file 'common_functions.js' //w.style.top = (parseFloat(window.innerHeight) + ((get_scroll_offset_y() * -1) + (minimized_count * 32))) + "px"; w.style.top = ((((((get_scroll_offset_y() - (get_tabbed_window_bar_offset_Y() * 0.0)) * -1.0115999) + ((minimized_count) * 32))) + get_minimized_windows_offset_Y()) + 4) + "px"; ////w.style.top = ((get_page_offset_Y() * -1.0) + (minimized_count * 32)) + "px"; } } } } } function minimized_table_scroll_top() { var minimize_table = null; var scroll_box = null; scroll_box = document.getElementById("scroll_box"); minimize_table = document.getElementById("minimized_menu"); if (scroll_box !== null) { if (minimize_table !== null) { //minimize_table.style.top = parseFloat(scroll_box.style.top) + "px"; minimize_table.scrollTo(parseFloat(minimize_table.style.left), 0); //alert("m000"); } } } function elem_scroll_Y(Y) { var min_table = null; var scroll_box = null; scroll_box = document.getElementById("scroll_box"); min_table = document.getElementById("minimized_menu"); if (minimized_table_exists() === true) { if (scroll_box !== null) { //min_table.scrollTo(parseFloat(min_table.style.left), parseFloat(Y)); min_table.style.top = (parseFloat(scroll_box.style.top) + parseFloat(Y)) + "px"; //min_table.style.top = Y + "px"; //alert("scrolled"); } } } //returns the Y position of the minimize menu/table due to scrolling up/down function get_scroll_offset_y() { var scroll_box = null; var scroll_offset = null; scroll_offset = 0; scroll_box = document.getElementById("scroll_box"); if (scroll_box !== null) { scroll_offset = parseFloat(scroll_box.scrollTop); } console.log("SCROLL: " + scroll_offset); //alert(scroll_offset); return scroll_offset; } //delete both the scroll box AND minimize table/menu function delete_scroll_box_and_minimize_table() { if (minimized_table_exists() === true) { delete_minimized_table(); } if (scroll_box_exists() === true) { delete_scroll_box(); } } function none_minimized_delete_scrollbox_table() { var min_win_count = null; min_win_count = get_all_minimized_windows().length; if (min_win_count > 0) { } else { delete_scroll_box_and_minimize_table(); } } function adjust_scroll_box_width_on_overflow_y() { var min_table = null; var scroll_box = null; var min_table_scroll_top = null; var scroll_box_scroll_top = null; var min_table_scroll_height = null; var scroll_box_scroll_height = null; var min_table_top_height = null; var scroll_box_top_height = null; scroll_box = document.getElementById("scroll_box"); min_table = document.getElementById("minimized_menu"); if (minimized_table_exists() === true) { if (scroll_box !== null) { min_table_scroll_top = parseFloat(min_table.scrollTop); scroll_box_scroll_top = parseFloat(scroll_box.scrollTop); min_table_scroll_height = parseFloat(min_table.scrollHeight); scroll_box_scroll_height = parseFloat(scroll_box.scrollHeight); min_table_top_height = min_table_scroll_top + min_table_scroll_height; scroll_box_top_height = scroll_box_scroll_top + scroll_box_scroll_height; if (min_table_top_height > scroll_box_top_height) { scroll_box.style.width = "330px"; } else { scroll_box.style.width = "309px"; // (parseFloat(scroll_box.style.width)) + "px"; } } } } //gets the offset width of the scroll box element. offset width //will also include the width of the vertical scroll bar if it exists. function get_scroll_box_offset_width() { var scroll_box = null; var offset_width = null; scroll_box = document.getElementById("scroll_box"); if (scroll_box !== null) { offset_width = parseFloat(scroll_box.offsetWidth); } return offset_width; } function has_vertical_overflow() { var min_table = null; var scroll_box = null; var min_table_scroll_top = null; var scroll_box_scroll_top = null; var min_table_scroll_height = null; var scroll_box_scroll_height = null; var min_table_top_height = null; var scroll_box_top_height = null; var has_y_overflow = null; scroll_box = document.getElementById("scroll_box"); min_table = document.getElementById("minimized_menu"); if (minimized_table_exists() === true) { if (scroll_box !== null) { min_table_scroll_top = parseFloat(min_table.scrollTop); scroll_box_scroll_top = parseFloat(scroll_box.scrollTop); min_table_scroll_height = parseFloat(min_table.scrollHeight); scroll_box_scroll_height = parseFloat(scroll_box.scrollHeight); min_table_top_height = min_table_scroll_top + min_table_scroll_height; scroll_box_top_height = scroll_box_scroll_top + scroll_box_scroll_height; if (min_table_top_height > scroll_box_top_height) { has_y_overflow = true; } else { has_y_overflow = false; } } } return has_y_overflow; } function adjust_stow_minimized_windows_box_width_on_overflow_y() { //check to see if vertical overflow is present on the scroll box //and the stack of minimized windows. if there is a vertical overflow, //then a scroll bar will be added to the scroll box object, changing its //width. adjust the width of the stow minimized windows box/button to //match the change in width. var stow_minimized_box = null; var is_stow_minimized_box_expanded = null; var scroll_box_offset_width = null; if (has_vertical_overflow() === true) { //get the stow minimized windows box/button //see file: 'stow_minimized_windows.js' stow_minimized_box = get_stow_minimized_window_box(); if (stow_minimized_box !== null) { //determine if the stow minimized windows box/button is extended, or if //it is retracted. see file: 'hide_show_stowed.js' is_stow_minimized_box_expanded = is_stow_minimized_window_box_expanded(); if (is_stow_minimized_box_expanded === true) { //get the width of the scrollbox, including the width of the vertical //scroll bar. scroll_box_offset_width = get_scroll_box_offset_width(); if (typeof (scroll_box_offset_width) === "number") { //set the width of the stow minimized windows box/button to the same width //as the scroll box. stow_minimized_box.style.width = parseFloat(scroll_box_offset_width) + "px"; //see file: 'tab_windows.js' for this function left_offset_all_tabbed_windows(); } } } } else { //get the stow minimized windows box/button //see file: 'stow_minimized_windows.js' stow_minimized_box = get_stow_minimized_window_box(); if (stow_minimized_box !== null) { //determine if the stow minimized windows box/button is extended, or if //it is retracted. see file: 'hide_show_stowed.js' is_stow_minimized_box_expanded = is_stow_minimized_window_box_expanded(); if (is_stow_minimized_box_expanded === true) { //get the width of the scrollbox, including the width of the vertical //scroll bar. scroll_box_offset_width = get_scroll_box_offset_width(); if (typeof (scroll_box_offset_width) === "number") { //set the width of the stow minimized windows box/button to the same width //as the scroll box. stow_minimized_box.style.width = parseFloat(scroll_box_offset_width) + "px"; //see file: 'tab_windows.js' for this function left_offset_all_tabbed_windows(); } } } } }