dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit fa4d7e7dcc84968da8d4d1c065cac7d32c55cbec
parent e6650b3c263f428ff6f9c7f684edda28e9e6fe6e
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun, 11 Jun 2023 16:47:39 -0700

doc

Diffstat:
Mpkg/web/handlers/handlers.go | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5218,10 +5218,12 @@ Loop: animate(payload.Move.S1(), payload.Move.S2(), payload.IDStr1) if payload.Move.Promo() != chess.NoPieceType || payload.IDStr2 != "" { + // Ensure the capturing piece is draw above the one being captured if payload.IDStr2 != "" { send(fmt.Sprintf(`<style>#%s { z-index: 2; }</style>`, payload.IDStr2)) send(fmt.Sprintf(`<style>#%s { z-index: 3; }</style>`, payload.IDStr1)) } + // Wait until end of moving animation before hiding the captured piece or change promotion image go func(payload interceptors.ChessMove, c echo.Context) { select { case <-time.After(animationMs * time.Millisecond):