js: Remove unnecessary setting of status bar size

An element with display: block will naturally adjust to fit the width of
its container, so if that's what you want there's no need to set its
width explicitly.
This commit is contained in:
Ben Harris
2022-10-17 23:04:22 +01:00
parent 49849e40ec
commit 3c3d8aff22

View File

@ -521,8 +521,6 @@ mergeInto(LibraryManager.library, {
var statusholder = document.getElementById("statusbarholder"); var statusholder = document.getElementById("statusbarholder");
statusbar = document.createElement("div"); statusbar = document.createElement("div");
statusbar.id = "statusbar"; statusbar.id = "statusbar";
statusbar.style.width = (onscreen_canvas.width - 4) + "px";
statusholder.style.width = onscreen_canvas.width + "px";
statusbar.appendChild(document.createTextNode(" ")); statusbar.appendChild(document.createTextNode(" "));
statusholder.appendChild(statusbar); statusholder.appendChild(statusbar);
}, },
@ -548,10 +546,6 @@ mergeInto(LibraryManager.library, {
js_canvas_set_size: function(w, h) { js_canvas_set_size: function(w, h) {
onscreen_canvas.width = w; onscreen_canvas.width = w;
offscreen_canvas.width = w; offscreen_canvas.width = w;
if (statusbar !== null) {
statusbar.style.width = (w - 4) + "px";
document.getElementById("statusbarholder").style.width = w + "px";
}
resizable_div.style.width = w + "px"; resizable_div.style.width = w + "px";
onscreen_canvas.height = h; onscreen_canvas.height = h;