Make mousewheel work during game play.
Closed this issue · 3 comments
Siderite commented
is it possible to add the use of mousewheel during games? to go though the moves. currently its only usable in analysis
Siderite commented
The buttons during play can be used to ascertain the current, prev and next plys.
<div class="buttons">
<div class="noop"/>
<button class="fbt" data-icon="" data-ply="0"/>
<button class="fbt" data-icon="" data-ply="9"/>
<button class="fbt" data-icon="" data-ply="11"/>
<button class="fbt glowing" data-icon="" data-ply="11"/>
<button class="fbt board-menu-toggle" title="menu" data-icon=""/>
</div>
Moving to a specific position can be achieved by triggering 'mousedown' events on the various buttons. I.e. one can create a button with a specific data-ply
attribute, append it to .buttons
, trigger mousedown, then remove it.
Siderite commented
Here is the line that disallows scrolling during gameplay: https://github.com/lichess-org/lila/blob/e2fe0defb0b389681a11f184803387ace5c94ceb/ui/round/src/view/main.ts#L41
Raised an issue to discuss the possibility of removing the check: lichess-org/lila#16152
Siderite commented
Implemented in v2.3.148