ref: 3c3d8aff2229be103c340c9c2e235c33127556fe
parent: 49849e40ec2560fc22cf2da2a5f9be10c90f42bc
author: Ben Harris <bjh21@bjh21.me.uk>
date: Mon Oct 17 19:04:22 EDT 2022
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.
--- a/emcclib.js
+++ b/emcclib.js
@@ -521,8 +521,6 @@
var statusholder = document.getElementById("statusbarholder");
statusbar = document.createElement("div");
statusbar.id = "statusbar";
- statusbar.style.width = (onscreen_canvas.width - 4) + "px";
- statusholder.style.width = onscreen_canvas.width + "px";
statusbar.appendChild(document.createTextNode(" "));
statusholder.appendChild(statusbar);
},
@@ -548,10 +546,6 @@
js_canvas_set_size: function(w, h) {
onscreen_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";
onscreen_canvas.height = h;