From ee6205399377ca3a56636a9473c7c2e28336585d Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Fri, 25 Mar 2016 11:49:33 -0400 Subject: [PATCH] working on em size for narrow displays --- web/chunkymap.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/chunkymap.php b/web/chunkymap.php index 55dcf5c..f0cef3e 100644 --- a/web/chunkymap.php +++ b/web/chunkymap.php @@ -715,12 +715,12 @@ function echo_chunkymap_canvas($show_player_names_enable, $decachunks_enable, $c //current_h = window.innerHeight; current_ratio = current_w/current_h; - //if (ctx.canvas.heightctx.canvas.width) { + size_1em_pixel_count = Math.round(ctx.canvas.height/EM_PER_WIDTH_COUNT); + } + else { + size_1em_pixel_count = Math.round(ctx.canvas.width/EM_PER_WIDTH_COUNT); + } if (powered_by_label!=null) { //powered_by_label.y = ctx.canvas.height-size_1em_pixel_count; powered_by_label.y = size_1em_pixel_count/2;