summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-21 18:31:25 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-21 18:31:25 +0200
commit6f4e972778f33baf618aa35d1a439dcdb0f39722 (patch)
tree74f926a64d4c76b59f7dbd7c24f2908364d75c62
parent8851740560c10488c8839ff7ebb741d21e81238f (diff)
downloadpax-pamir-6f4e972778f33baf618aa35d1a439dcdb0f39722.tar.gz
scroll_with_middle_mouse and scroll_into_view
-rw-r--r--play.css10
-rw-r--r--play.js9
2 files changed, 5 insertions, 14 deletions
diff --git a/play.css b/play.css
index 5f28741..b50cbb1 100644
--- a/play.css
+++ b/play.css
@@ -1,4 +1,4 @@
-html { background-color: slategray; }
+body { background-color: slategray; }
header { background-color: silver; }
#role_Gray { background-color: #b7b2b0; }
#role_Blue { background-color: #95b4ca; }
@@ -27,10 +27,6 @@ main {
scrollbar-width: auto;
}
-.action {
- cursor: pointer;
-}
-
#tooltip {
pointer-events: none;
position: fixed;
@@ -61,7 +57,6 @@ body.shift #tooltip.focus { display: block; }
cursor: pointer;
display: flex;
justify-content: space-between;
- user-select: none;
border-bottom: 1px solid black;
background-color: #856781;
height: 40px;
@@ -297,7 +292,6 @@ body.shift #tooltip.focus { display: block; }
line-height: 50px;
text-align: center;
text-shadow: 0 0 8px black;
- user-select: none;
filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}
@@ -668,7 +662,6 @@ body.open .hand.minimize .card {
.player_hand_size {
position: absolute;
- user-select: none;
top: 19px;
left: -3px;
width: 36px;
@@ -691,7 +684,6 @@ body.open .hand.minimize .card {
.player_dial .prize {
position: absolute;
- user-select: none;
top: 94px;
left: 135px;
height: 26px;
diff --git a/play.js b/play.js
index 642223d..0be21ad 100644
--- a/play.js
+++ b/play.js
@@ -336,15 +336,15 @@ let ui = {
}
function scroll_to_map() {
- ui.board.scrollIntoView({behavior:'smooth'})
+ scroll_into_view(ui.board)
}
function scroll_to_market() {
- ui.market.scrollIntoView({behavior:'smooth'})
+ scroll_into_view(ui.market)
}
function scroll_to_player(p) {
- ui.player[p].area.scrollIntoView({behavior:'smooth'})
+ scroll_into_view(ui.player[p].area)
}
let open_toggle = true
@@ -365,7 +365,7 @@ function on_focus_card_tip(c) {
}
function on_click_card_tip(c) {
- ui.cards[c].scrollIntoView({behavior:'smooth'})
+ scroll_into_view(ui.cards[c])
}
function on_focus_card(evt) {
@@ -1094,4 +1094,3 @@ function build_ui() {
ui.player[top].hand_size.classList.add("hide")
}
-scroll_with_middle_mouse("main")