fix chessground board preload HTML

pull/7377/head
Thibault Duplessis 2020-09-27 08:09:44 +02:00
parent 180d349eb5
commit 732147e93f
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ trait ChessgroundHelper {
if (ctx.pref.is3d) ""
else {
def top(p: Pos) = orient.fold(7 - p.rank.index, p.rank.index) * 12.5
def left(p: Pos) = orient.fold(p.file.index, 7 - p.rank.index) * 12.5
def left(p: Pos) = orient.fold(p.file.index, 7 - p.file.index) * 12.5
val highlights = ctx.pref.highlight ?? lastMove.distinct.map { pos =>
s"""<square class="last-move" style="top:${top(pos)}%;left:${left(pos)}%"></square>"""
} mkString ""