diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-23 11:38:59 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-23 11:38:59 +0200 |
commit | 4284097f9cf8f94f91ee4fd474fc284ad561cb7c (patch) | |
tree | a35669d8c6e019c510cd48ae3951ae7b6ffac1a6 | |
parent | 927c259f40be6b529acf541b697e94cd29050728 (diff) | |
download | algeria-4284097f9cf8f94f91ee4fd474fc284ad561cb7c.tar.gz |
eslint warnings
-rw-r--r-- | play.js | 26 |
1 files changed, 2 insertions, 24 deletions
@@ -1,5 +1,7 @@ "use strict" +/* global action_button, data, scroll_into_view, send_action, view */ + const SCALE = 1.8033333333333332 const FLN = 0 @@ -330,27 +332,6 @@ function is_loc_action(x) { return !!(view.actions && view.actions.loc && view.actions.loc.includes(x)) } -let action_register = [] - -function register_action(e, action, id) { - e.my_action = action - e.my_id = id - e.onmousedown = on_click_action - action_register.push(e) -} - -function on_click_action(evt) { - if (evt.button === 0) - if (send_action(evt.target.my_action, evt.target.my_id)) - evt.stopPropagation() -} - -function is_action(action, arg) { - if (arg === undefined) - return !!(view.actions && view.actions[action] === 1) - return !!(view.actions && view.actions[action] && view.actions[action].includes(arg)) -} - let on_init_once = false function on_focus_unit(evt) { @@ -649,9 +630,6 @@ function on_update() { // eslint-disable-line no-unused-vars update_map() - for (let e of action_register) - e.classList.toggle("action", is_action(e.my_action, e.my_id)) - action_button("quick_setup", "Quick Setup") action_button("end_deployment", "End deployment") action_button("roll", "Roll") |