From ad9ee5a52470b864f6914ba9b5c2c9ae2d6ab072 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 7 Nov 2022 23:02:06 +0000 Subject: js: Move much of the handling of device pixel ratios to the mid-end Now that the mid-end knows how to do it, we can remove some complexity from the front end. --- emcclib.js | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'emcclib.js') diff --git a/emcclib.js b/emcclib.js index 63540ce..84336f3 100644 --- a/emcclib.js +++ b/emcclib.js @@ -559,22 +559,6 @@ mergeInto(LibraryManager.library, { }, /* - * void js_canvas_set_nominal_size(); - * - * Set the nominal size of the puzzle to the current canvas size - * scaled to CSS pixels. This should be called whenever the - * canvas size is changed other than in response to a change of - * device pixel ratio. This nominal size will then be used at - * every change of device pixel ratio to calculate the new - * physical size of the canvas. - */ - js_canvas_set_nominal_size: function() { - var dpr = window.devicePixelRatio || 1; - nominal_width = onscreen_canvas.width / dpr; - nominal_height = onscreen_canvas.height / dpr; - }, - - /* * double js_get_device_pixel_ratio(); * * Return the current device pixel ratio. -- cgit v1.1