mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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:
@ -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;
|
||||||
|
Reference in New Issue
Block a user