projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Draft Eightpieces rules. Fix display: PNG images + promotions on 2 lines
[vchess.git]
/
client
/
src
/
utils
/
printDiagram.js
diff --git
a/client/src/utils/printDiagram.js
b/client/src/utils/printDiagram.js
index
aebdc24
..
cc97939
100644
(file)
--- a/
client/src/utils/printDiagram.js
+++ b/
client/src/utils/printDiagram.js
@@
-70,6
+70,7
@@
export function getDiagram(args) {
const orientation = args.orientation || "w";
const markArray = getMarkArray(args.marks);
const shadowArray = getShadowArray(args.shadow);
const orientation = args.orientation || "w";
const markArray = getMarkArray(args.marks);
const shadowArray = getShadowArray(args.shadow);
+ const vr = new V(); //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 boardDiv = "";
const [startX, startY, inc] =
orientation == "w" ? [0, 0, 1] : [V.size.x - 1, V.size.y - 1, -1];
@@
-87,8
+88,8
@@
export function getDiagram(args) {
boardDiv +=
"<img " +
"src='/images/pieces/" +
boardDiv +=
"<img " +
"src='/images/pieces/" +
-
V.getPpath(board[i][j]
) +
-
".svg
' " +
+
vr.getPpath(board[i][j], null, null, orientation
) +
+
V.IMAGE_EXTENSION + "
' " +
"class='piece'/>";
}
if (markArray.length > 0 && markArray[i][j])
"class='piece'/>";
}
if (markArray.length > 0 && markArray[i][j])