aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-10-17 23:04:22 +0100
committerBen Harris <bjh21@bjh21.me.uk>2022-10-17 23:16:35 +0100
commit3c3d8aff2229be103c340c9c2e235c33127556fe (patch)
treec9f1eb40c06f0bea15e4d8b22c45298d462fab99
parent49849e40ec2560fc22cf2da2a5f9be10c90f42bc (diff)
downloadpuzzles-3c3d8aff2229be103c340c9c2e235c33127556fe.zip
puzzles-3c3d8aff2229be103c340c9c2e235c33127556fe.tar.gz
puzzles-3c3d8aff2229be103c340c9c2e235c33127556fe.tar.bz2
puzzles-3c3d8aff2229be103c340c9c2e235c33127556fe.tar.xz
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.
-rw-r--r--emcclib.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/emcclib.js b/emcclib.js
index 00f718e..07f5f40 100644
--- a/emcclib.js
+++ b/emcclib.js
@@ -521,8 +521,6 @@ mergeInto(LibraryManager.library, {
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 @@ mergeInto(LibraryManager.library, {
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;