projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix complete rules of Cwda
[xogo.git]
/
utils
/
drawDiagrams.js
diff --git
a/utils/drawDiagrams.js
b/utils/drawDiagrams.js
index
ec55d50
..
3dd01f6
100644
(file)
--- a/
utils/drawDiagrams.js
+++ b/
utils/drawDiagrams.js
@@
-11,8
+11,12
@@
function fenToDiag(vname) {
function getDiagSize(elt) {
const baseWidth = Math.min(window.innerWidth, 800);
let multFact = 1;
function getDiagSize(elt) {
const baseWidth = Math.min(window.innerWidth, 800);
let multFact = 1;
- if (elt.classList.contains("left") || elt.classList.contains("right"))
- multFact = 0.45;
+ if (elt.classList.contains("left") || elt.classList.contains("right")) {
+ if (baseWidth >= 551)
+ multFact = 0.45;
+ else
+ multFact = 0.7;
+ }
else if (baseWidth > 630)
multFact = 0.5;
else
else if (baseWidth > 630)
multFact = 0.5;
else
@@
-42,6
+46,9
@@
function re_drawDiagrams() {
vr[i] = new V({
element: "diag_" + i,
fen: diagrams[i].dataset.fen,
vr[i] = new V({
element: "diag_" + i,
fen: diagrams[i].dataset.fen,
+ marks: diagrams[i].dataset.mks
+ ? diagrams[i].dataset.mks.split(',')
+ : undefined,
color: diagrams[i].dataset.col || 'w',
options: {},
diagram: true
color: diagrams[i].dataset.col || 'w',
options: {},
diagram: true