summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-21 18:31:09 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-21 18:31:09 +0200
commit9eab40572798003c4fd19d3b966e262b0c023080 (patch)
tree4bd0af749aa2ea0d54641a60e64d9282f40ca820
parent4e9345ccc9ab4eb8c8b7ae15647deb65147ea268 (diff)
downloadnevsky-9eab40572798003c4fd19d3b966e262b0c023080.tar.gz
scroll_with_middle_mouse and scroll_into_view
-rw-r--r--play.css1
-rw-r--r--play.js7
2 files changed, 3 insertions, 5 deletions
diff --git a/play.css b/play.css
index f962a13..e1fabe8 100644
--- a/play.css
+++ b/play.css
@@ -50,7 +50,6 @@ header.your_turn { background-color: orange; }
.panel_header {
background-color: #444;
color: white;
- user-select: none;
font-weight: bold;
text-align: center;
padding: 3px 1em;
diff --git a/play.js b/play.js
index 2c364aa..14afb6d 100644
--- a/play.js
+++ b/play.js
@@ -1824,7 +1824,7 @@ function on_blur_locale_tip(loc) {
}
function on_click_locale_tip(loc) {
- ui.locale[loc].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.locale[loc])
}
function on_focus_way_tip(way) {
@@ -1836,11 +1836,11 @@ function on_blur_way_tip(way) {
}
function on_click_way_tip(way) {
- ui.ways[way].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.ways[way])
}
function on_click_lord_tip(lord) {
- ui.lord_mat[lord].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.lord_mat[lord])
}
function sub_locale_name(match, p1) {
@@ -1940,4 +1940,3 @@ function pack4_get(word, n) {
}
build_map()
-scroll_with_middle_mouse("main")