diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-10-21 18:31:25 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-10-21 18:31:25 +0200 |
commit | 6f4e972778f33baf618aa35d1a439dcdb0f39722 (patch) | |
tree | 74f926a64d4c76b59f7dbd7c24f2908364d75c62 /play.js | |
parent | 8851740560c10488c8839ff7ebb741d21e81238f (diff) | |
download | pax-pamir-6f4e972778f33baf618aa35d1a439dcdb0f39722.tar.gz |
scroll_with_middle_mouse and scroll_into_view
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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") |