projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unambiguous section in the PGN + some fixes + code formatting and fix typos
[vchess.git]
/
client
/
src
/
utils
/
notation.js
diff --git
a/client/src/utils/notation.js
b/client/src/utils/notation.js
index
464b5ee
..
4402e26
100644
(file)
--- a/
client/src/utils/notation.js
+++ b/
client/src/utils/notation.js
@@
-1,12
+1,13
@@
// Take into account that the move may be a multi-move
// Take into account that the move may be a multi-move
-export function getFullNotation(move) {
+export function getFullNotation(move, type) {
+ if (!type) type = "notation";
if (Array.isArray(move)) {
let notation = "";
for (let i=0; i<move.length; i++)
if (Array.isArray(move)) {
let notation = "";
for (let i=0; i<move.length; i++)
- notation += move[i]
.notation
+ ",";
+ notation += move[i]
[type]
+ ",";
// Remove last comma:
return notation.slice(0,-1);
}
// Simple (usual) case
// Remove last comma:
return notation.slice(0,-1);
}
// Simple (usual) case
- return move
.notation
;
+ return move
[type]
;
}
}