projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various fixes, additions...
[vchess.git]
/
public
/
javascripts
/
utils
/
printDiagram.js
diff --git
a/public/javascripts/utils/printDiagram.js
b/public/javascripts/utils/printDiagram.js
index
ef75049
..
61c726e
100644
(file)
--- a/
public/javascripts/utils/printDiagram.js
+++ b/
public/javascripts/utils/printDiagram.js
@@
-15,9
+15,8
@@
function getDiagram(args)
for (let i=0; i<squares.length; i++)
{
const res = /^([a-z]+)([0-9]+)$/i.exec(squares[i]);
for (let i=0; i<squares.length; i++)
{
const res = /^([a-z]+)([0-9]+)$/i.exec(squares[i]);
- const x = sizeX - parseInt(res[2]); //white at bottom, so counting is reversed
- const y = res[1].charCodeAt(0)-97; //always one char: max 26, big enough
- markArray[x][y] = true;
+ const coords = V.SquareToCoords(res);
+ markArray[coords.x][coords.y] = true;
}
}
let boardDiv = "";
}
}
let boardDiv = "";