chiark / gitweb /
Fix completion checking in Killer Solo.
[sgt-puzzles.git] / emcclib.js
index e0c4bea8251128a9f014118975e3f5fbbe199ad4..385281ad0b6778e0120a554c86e827de9f18aa04 100644 (file)
@@ -412,7 +412,7 @@ mergeInto(LibraryManager.library, {
         // Find the width of the string
         var ctx1 = onscreen_canvas.getContext('2d');
         ctx1.font = font;
-        var width = ctx1.measureText(midpoint_test_str).width;
+        var width = (ctx1.measureText(midpoint_test_str).width + 1) | 0;
 
         // Construct a test canvas of appropriate size, initialise it to
         // black, and draw the string on it in white
@@ -567,6 +567,7 @@ mergeInto(LibraryManager.library, {
             statusbar.style.width = (w - 4) + "px";
             document.getElementById("statusbarholder").style.width = w + "px";
         }
+        resizable_div.style.width = w + "px";
 
         onscreen_canvas.height = h;
         offscreen_canvas.height = h;