From 2fb32d05f97b6787c5a01f209cc1791395e76bfe Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 21 Oct 2023 18:33:03 +0200 Subject: scroll_with_middle_mouse and scroll_into_view --- play.css | 1 - play.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/play.css b/play.css index e6f1d77..39b0b3d 100644 --- a/play.css +++ b/play.css @@ -148,7 +148,6 @@ aside { min-width: 220px; } width: 300px; border: 1px solid black; box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.5); - user-select: none; } .card_list_header { cursor: move; diff --git a/play.js b/play.js index 882fece..4a6fe70 100644 --- a/play.js +++ b/play.js @@ -296,7 +296,7 @@ function on_blur_space_tip(s) { } function on_click_space_tip(s) { - ui.space_list[s].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" }) + scroll_into_view(ui.space_list[s]) } function on_log_line(text, cn) { @@ -1575,4 +1575,3 @@ function on_update() { drag_element_with_mouse("#removed", "#removed_header") drag_element_with_mouse("#discard", "#discard_header") -scroll_with_middle_mouse("main") -- cgit v1.2.3