diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -428,11 +428,6 @@ function is_action(action, arg) { return !!(view.actions && view.actions[action] && set_has(view.actions[action], arg)) } -function toggle_zoom2() { - document.querySelector("main").classList.toggle("fit") - toggle_zoom() -} - function toggle_pieces() { if (ui.map.classList.contains("hide_tokens")) { ui.map.classList.remove("hide_tokens") @@ -1590,4 +1585,14 @@ function map_get(map, key, missing) { return missing } +// TODO: clean up this mess... +var orig_toggle_zoom = toggle_zoom +toggle_zoom = function () { + orig_toggle_zoom() + if (document.getElementById("mapwrap").classList.contains("fit")) + document.getElementById("grid").classList.add("fit") + else + document.getElementById("grid").classList.remove("fit") +} + scroll_with_middle_mouse("main") |