shithub: puzzles

Download patch

ref: 2522dd249bc30472a8a9a1ae12286cba6542ba9c
parent: 85dabc1eb97c4e144744f863d2e6f54555cc0db9
author: Ben Harris <bjh21@bjh21.me.uk>
date: Fri Dec 2 18:18:17 EST 2022

js: Don't bother resizing offscreen canvas at startup

It will get its size set soon enough once we know the size of the
puzzle anyway.

--- a/emccpre.js
+++ b/emccpre.js
@@ -245,8 +245,6 @@
     // Construct the off-screen canvas used for double buffering.
     onscreen_canvas = document.getElementById("puzzlecanvas");
     offscreen_canvas = document.createElement("canvas");
-    offscreen_canvas.width = onscreen_canvas.width;
-    offscreen_canvas.height = onscreen_canvas.height;
 
     // Stop right-clicks on the puzzle from popping up a context menu.
     // We need those right-clicks!