X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Futils%2FprintDiagram.js;h=4a3a50ee4b5ad199a68d184dd57afa1c2cccade4;hb=7b6306a8f359821b352995f5b9a27ba278dc5d48;hp=524e12bca3d67c3affcdb3af4baa4fbadbc9ec63;hpb=e50a802531b99829c533f22ecd21e359e7e1e049;p=vchess.git diff --git a/client/src/utils/printDiagram.js b/client/src/utils/printDiagram.js index 524e12bc..4a3a50ee 100644 --- a/client/src/utils/printDiagram.js +++ b/client/src/utils/printDiagram.js @@ -75,10 +75,12 @@ export function getDiagram(args) { const orientation = args.orientation || "w"; const markArray = getMarkArray(args.marks); const shadowArray = getShadowArray(args.shadow); - const vr = new V(); //just for pieces images paths + const vr = new V(); //TODO: just for pieces images paths let boardDiv = ""; const [startX, startY, inc] = orientation == "w" ? [0, 0, 1] : [V.size.x - 1, V.size.y - 1, -1]; + let lightOddity = (V.size.x + V.size.y) % 2; + if (V.DarkBottomRight) lightOddity = 1 - lightOddity; for (let i = startX; i >= 0 && i < V.size.x; i += inc) { boardDiv += "