From 05d86da25bb6b4e41dd34bfb94a3b424cbcf3cf6 Mon Sep 17 00:00:00 2001 From: Sergei Bachinin Date: Tue, 27 Aug 2024 13:34:08 +0700 Subject: [PATCH] force default cursor while scrolling the bracket --- lib/scroll/scrolla.mjs | 2 ++ lib/styles/rounds.scss | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/scroll/scrolla.mjs b/lib/scroll/scrolla.mjs index eeb967f..1ffa08a 100644 --- a/lib/scroll/scrolla.mjs +++ b/lib/scroll/scrolla.mjs @@ -49,7 +49,9 @@ export const create_scrolla = (html_shell, get_option) => { html_shell.the_root_element.style.setProperty('--scroll-transition-duration', `${SCROLL_TRANSITION_DURATION / 1000}s`) const handle_native_scroll = () => { + matches_positioner.classList.add('is-scrolling') scrollbar_functions.update_position(html_shell, get_option, scroller.scrollTop) + debounced_end_scrolling(matches_positioner) } const forget_window_onscroll = disable_matches_scroll_on_window_scroll(scroller, get_option) diff --git a/lib/styles/rounds.scss b/lib/styles/rounds.scss index 2431ba4..d21e4f5 100644 --- a/lib/styles/rounds.scss +++ b/lib/styles/rounds.scss @@ -23,7 +23,9 @@ } } - + .matches-positioner.is-scrolling * { + cursor: auto !important; + } .bronze-round-wrapper { display: flex; @@ -64,17 +66,19 @@ .match-wrapper { padding-left: calc(var(--matchHorMargin) * 0.3); + &.even { align-self: end; padding-top: var(--matchMinVerticalGap); padding-bottom: var(--matchMinVerticalGap); } + &.odd { align-self: start; padding-top: calc(var(--matchMinVerticalGap) + var(--matchFontSize) * 1.5); padding-bottom: calc(var(--matchMinVerticalGap) + var(--matchFontSize) * 1.5); } - + &.odd .line-wrapper.upper, &.even .line-wrapper.lower { box-shadow: calc(var(--connectionLinesWidth) * -1) 0px 0px 0px; @@ -233,7 +237,7 @@ } } - .matches-positioner > .round-wrapper:last-of-type .line-wrapper { + .matches-positioner>.round-wrapper:last-of-type .line-wrapper { /* do not show right vertical line for last round */ color: transparent; } @@ -254,7 +258,8 @@ /* defined at this depth because on upper levels color property is used for box-shadow tricks */ color: var(--matchTextColor); - &.empty-side, &:not([contestant-id]) { + &.empty-side, + &:not([contestant-id]) { pointer-events: none; }