aboutsummaryrefslogtreecommitdiff
path: root/emcclib.js
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-11-07 23:02:06 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-11-08 10:27:02 +0000
commitad9ee5a52470b864f6914ba9b5c2c9ae2d6ab072 (patch)
treef265cb1b0cf504fa9542f1647e506a770bf0e837 /emcclib.js
parente45cd43aaab7af014607b2578ec68a5bbec1b609 (diff)
downloadpuzzles-ad9ee5a52470b864f6914ba9b5c2c9ae2d6ab072.zip
puzzles-ad9ee5a52470b864f6914ba9b5c2c9ae2d6ab072.tar.gz
puzzles-ad9ee5a52470b864f6914ba9b5c2c9ae2d6ab072.tar.bz2
puzzles-ad9ee5a52470b864f6914ba9b5c2c9ae2d6ab072.tar.xz
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.
Diffstat (limited to 'emcclib.js')
-rw-r--r--emcclib.js16
1 files changed, 0 insertions, 16 deletions
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.