summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-23 11:36:14 +0200
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-23 11:36:14 +0200
commit927c259f40be6b529acf541b697e94cd29050728 (patch)
treec51402589dd9379f7dc3ba27c3fec8ed1023082d /play.js
parent38cbbb218e2d47c653bbd7cdb7c7c18052de2385 (diff)
downloadalgeria-927c259f40be6b529acf541b697e94cd29050728.tar.gz
Update for latest server software.
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/play.js b/play.js
index 4d69287..aa084fb 100644
--- a/play.js
+++ b/play.js
@@ -1,7 +1,5 @@
"use strict"
-/* global view, data, send_action, action_button, scroll_with_middle_mouse */
-
const SCALE = 1.8033333333333332
const FLN = 0
@@ -555,7 +553,7 @@ Node.prototype.appendChildAnimated = function(e) {
e.animate([
{ transform: transformFrom },
{ transform: transformTo },
- ], {
+ ], {
duration: 1000,
easing: 'ease',
})
@@ -732,7 +730,7 @@ function on_update() { // eslint-disable-line no-unused-vars
action_button("undo", "Undo")
// XXX debug
- action_button("restart", "Restart")
+ action_button("restart", "Restart")
action_button("reset", "Reset")
}
@@ -766,7 +764,7 @@ function on_blur_area_tip(x) { // eslint-disable-line no-unused-vars
}
function on_click_area_tip(x) { // eslint-disable-line no-unused-vars
- ui.areas[x].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.areas[x])
}
function sub_area_name(_match, p1, _offset, _string) {
@@ -784,7 +782,7 @@ function on_blur_unit_tip(x) { // eslint-disable-line no-unused-vars
}
function on_click_unit_tip(x) { // eslint-disable-line no-unused-vars
- ui.units[x].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.units[x])
}
function sub_unit_name(_match, p1, _offset, _string) {
@@ -834,5 +832,3 @@ function on_log(text) { // eslint-disable-line no-unused-vars
p.innerHTML = text
return p
}
-
-scroll_with_middle_mouse("main")