Skip to content

Commit

Permalink
change the round buttons element
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Dec 19, 2024
1 parent 6a20cbd commit 2f390cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions ui/round/css/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $col1-mat-height: $col1-player-clock-height * 2 / 5;
$col1-moves-height: 4em;
$move-tag: 'kwdb';
$rmoves-tag: 'rm6';
$rbuttons-tag: 'rb1';
$moves-tag: 'l4x';
$index-tag: 'i5z';
$active-class: 'a1t';
2 changes: 1 addition & 1 deletion ui/round/css/_moves-col1.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
}
}

.buttons {
#{$rbuttons-tag} {
display: none;
}

Expand Down
2 changes: 1 addition & 1 deletion ui/round/css/_moves.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $buttons-height: 2.5rem;
@extend %flex-column, %double-tap;
position: relative;

.buttons {
#{$rbuttons-tag} {
@extend %box-shadow;

flex: 0 0 $buttons-height;
Expand Down
5 changes: 3 additions & 2 deletions ui/round/src/view/replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const scrollMax = 99999,
indexTag = 'i5z',
indexTagUC = indexTag.toUpperCase(),
movesTag = 'l4x',
rmovesTag = 'rm6';
rmovesTag = 'rm6',
rbuttonsTag = 'rb1';

const autoScroll = throttle(100, (movesEl: HTMLElement, ctrl: RoundController) =>
window.requestAnimationFrame(() => {
Expand Down Expand Up @@ -146,7 +147,7 @@ const goThroughMoves = (ctrl: RoundController, e: Event) => {
function renderButtons(ctrl: RoundController) {
const firstPly = util.firstPly(ctrl.data),
lastPly = util.lastPly(ctrl.data);
return h('div.buttons', [
return h(rbuttonsTag, [
analysisButton(ctrl) || h('div.noop'),
...[
[licon.JumpFirst, firstPly],
Expand Down

0 comments on commit 2f390cb

Please sign in to comment.