summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-21 18:32:46 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-21 18:32:46 +0200
commit2dadb8de216a3fd46a8f692c66f03336c4f71d00 (patch)
tree9fd27859b1c667ae6d868ebc354cfc2889b61de6 /play.js
parent209b4863e5796f5f19506b241599eb4abe1e24f6 (diff)
downloadwaterloo-campaign-1815-2dadb8de216a3fd46a8f692c66f03336c4f71d00.tar.gz
scroll_with_middle_mouse and scroll_into_view
Diffstat (limited to 'play.js')
-rw-r--r--play.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/play.js b/play.js
index a666257..b4ff74c 100644
--- a/play.js
+++ b/play.js
@@ -197,7 +197,6 @@ for (let p = 0; p < ui.pieces.length; ++p) {
ui.pieces[p].my_name = data.pieces[p].name
}
-scroll_with_middle_mouse("main")
/*
* TOOLTIPS & ACTIONS
@@ -247,7 +246,7 @@ function on_blur_hex_tip(id) {
}
function on_click_hex_tip(id) {
- ui.hexes[id].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.hexes[id])
}
function on_focus_piece_tip(id) {
@@ -259,7 +258,7 @@ function on_blur_piece_tip(id) {
}
function on_click_piece_tip(id) {
- ui.pieces[id].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.pieces[id])
}
function on_blur() {