diff options
-rw-r--r-- | public/common/client.js | 16 | ||||
-rw-r--r-- | server.js | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/public/common/client.js b/public/common/client.js index 6de38fe..f399e86 100644 --- a/public/common/client.js +++ b/public/common/client.js @@ -1133,11 +1133,13 @@ var update_zoom = function () {} mapwrap.dataset.fit = "width" break } + // fall through case "width": if (should_fit_both(1)) { mapwrap.dataset.fit = "both" break } + // fall through case "both": mapwrap.dataset.fit = "none" } @@ -1231,7 +1233,7 @@ var update_zoom = function () {} mom_last_y = [ transform1.y, transform1.y, transform1.y ] } - function abort_measure(time) { + function abort_measure() { mom_last_t = mom_last_x = mom_last_y = null } @@ -1408,11 +1410,13 @@ var update_zoom = function () {} case 109: case 189: disable_map_fit() - let win_w = e_scroll.clientWidth - let win_h = e_scroll.clientHeight - let real_min_zoom = Math.min(MIN_ZOOM, win_w / map_w, win_h / map_h) - zoom_to(Math.max(real_min_zoom, transform1.scale - 0.1)) - event.preventDefault() + { + let win_w = e_scroll.clientWidth + let win_h = e_scroll.clientHeight + let real_min_zoom = Math.min(MIN_ZOOM, win_w / map_w, win_h / map_h) + zoom_to(Math.max(real_min_zoom, transform1.scale - 0.1)) + event.preventDefault() + } break // '0' case 48: @@ -1297,8 +1297,6 @@ const SQL_INSERT_REMATCH = SQL(` game_id `).pluck() -const SQL_INSERT_REMATCH_PLAYERS = SQL("insert into players (game_id, user_id, role, is_invite) select ?, user_id, role, user_id!=? from players where game_id=?") - const QUERY_LIST_PUBLIC_GAMES_OPEN = SQL(` select * from game_view where status=0 and not is_private and join_count > 0 and join_count < player_count and not exists ( select 1 from contacts where me = owner_id and you = ? and relation < 0 ) |