mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 15:41:30 -07:00
js: Very bad attempt at making puzzles change size when zooming
This has the entertaining consequence that repeatedly zooming in and out causes puzzles to gradually shrink, thus demonstrating that recording the nominal size correctly will be necessary.
This commit is contained in:
@ -544,12 +544,15 @@ mergeInto(LibraryManager.library, {
|
||||
* size.
|
||||
*/
|
||||
js_canvas_set_size: function(w, h) {
|
||||
var dpr = window.devicePixelRatio || 1;
|
||||
onscreen_canvas.width = w;
|
||||
offscreen_canvas.width = w;
|
||||
resizable_div.style.width = w / (window.devicePixelRatio || 1) + "px";
|
||||
resizable_div.style.width = w / dpr + "px";
|
||||
nominal_width = w / dpr;
|
||||
|
||||
onscreen_canvas.height = h;
|
||||
offscreen_canvas.height = h;
|
||||
nominal_height = h / dpr;
|
||||
},
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user